replacing directory in document creation process
[privoxy.git] / GNUmakefile.in
index 4a4c5f1..021c9d5 100644 (file)
@@ -1,6 +1,6 @@
 # Note:  Makefile is built automatically from Makefile.in
 #
-# $Id: GNUmakefile.in,v 1.88 2002/04/25 19:13:57 morcego Exp $
+# $Id: GNUmakefile.in,v 1.94 2002/04/27 08:23:29 swa Exp $
 #
 # Written by and Copyright (C) 2001 the SourceForge
 # Privoxy team. http://www.privoxy.org/
@@ -208,7 +208,7 @@ all: $(PROGRAM)
 #############################################################################
 .PHONY: all inifiles redhat-dist redhat-upload solaris-dist suse-dist \
 suse-upload win-dist tarball-dist dok redhat-dok webserver clean clobber tags \
-install
+install conectiva-spec conectiva-dist conectiva-upload
 
 
 #############################################################################
@@ -280,15 +280,6 @@ rpm-stuff: dist-check clean clobber
                fi; \
        done; \
 
-#############################################################################
-# redhat distribution alpha and x86
-#############################################################################
-redhat-dist: rpm-stuff
-
-       $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" -czf $(TAR_ARCH) .
-       $(RPM) --clean -ta  $(TAR_ARCH)
-       if [ -f $(TAR_ARCH) ]; then  $(RM) $(TAR_ARCH); fi
-
 check-release:
        @if [ "$(RPM_PACKAGEV)" = "" ]; then \
                echo ; \
@@ -296,13 +287,50 @@ check-release:
                echo "  No value given for RPM_PACKAGEV. Please use:"; \
                echo "  make dist-upload RPM_PACKAGEV=release"; \
                echo "  where \"release\" is the release number you want to and"; \
-               echo "  where \"dist\" is the name of the distro \(redhat or suse\)"; \
+               echo "  where \"dist\" is the name of the distro (redhat or suse)"; \
                echo ; \
                echo "  Ex: make redhat-upload RPM_PACKAGEV=1"; \
+               echo ""; \
+               echo "ATTENTION: If your distribution use a specific tag on the"; \
+               echo "           release field (like \"cl\" for Conectiva, and"; \
+               echo "           \"mdk\" for Mandrake), DO NOT put it on the value"; \
+               echo "           given to RPM_PACKAGEV. It will be added automaticaly."; \
+               echo "           Do it like you would do for a redhat package,"; \
+               echo "           (i.e. just the number)."; \
                echo ; \
                exit 1; \
        fi
 
+
+#############################################################################
+# Create Conectiva specfile from RedHat specfile
+#############################################################################
+conectiva-spec:
+       rm -f privoxy-cl.spec
+       chmod a+x genclspec.sh
+       ./genclspec.sh
+
+#############################################################################
+# Conectiva distribution for x86
+#############################################################################
+conectiva-dist: rpm-stuff conectiva-spec
+
+       $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-rh.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
+       $(RPM) --clean -ta  $(TAR_ARCH)
+       if [ -f $(TAR_ARCH) ]; then  $(RM) $(TAR_ARCH); fi
+
+conectiva-upload: check-release
+       make redhat-upload RPM_PACKAGEV=$(RPM_PACKAGEV)cl
+
+#############################################################################
+# redhat distribution alpha and x86
+#############################################################################
+redhat-dist: rpm-stuff
+
+       $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
+       $(RPM) --clean -ta  $(TAR_ARCH)
+       if [ -f $(TAR_ARCH) ]; then  $(RM) $(TAR_ARCH); fi
+
 # anonymously ncftps the rpms to sourceforge
 redhat-upload: check-release
        ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/SRPMS/privoxy-$(RPM_VERSION)-$(RPM_PACKAGEV).src.rpm
@@ -329,7 +357,7 @@ suse-dist: rpm-stuff
        exit 1;\
        fi
 
-       $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-rh.spec" -czf $(TAR_ARCH) .
+       $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-rh.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
        $(RPM) --clean -ta  $(TAR_ARCH)
        if [ -f $(TAR_ARCH) ]; then  $(RM) $(TAR_ARCH); fi
 
@@ -376,14 +404,14 @@ gen-dist: dist-check
        $(STRIP_PROG) $(PROGRAM)
        $(LN) -s current ../privoxy-$(VERSION)-$(CODE_STATUS)
 # add program
-       (cd .. && $(TAR) -cvhf privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$(PROGRAM))
+       (cd .. && $(TAR) -cvhf --exclude "PACKAGERS" privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$(PROGRAM))
 # add config files
        for foo in $(CONFIG_FILES); do \
-               (cd .. && $(TAR) -uvhf privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
+               (cd .. && $(TAR) -uvhf --exclude "PACKAGERS" privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
        done; 
 # add documentation
        for foo in $(DOC_FILES); do \
-               (cd .. && $(TAR) -uvhf privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
+               (cd .. && $(TAR) -uvhf --exclude "PACKAGERS" privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
        done;
 # and zip the archive
        $(RM) ../privoxy-$(VERSION)-$(CODE_STATUS)
@@ -478,7 +506,7 @@ tarball-dist: dist-check clean clobber
        -o -path "*/debian/*" -o -path "*/actions/*" -o -name "*.php" \)`; do \
           files="$$files privoxy-$(VERSION)-$(CODE_STATUS)/$$i"; \
        done &&  \
-       cd .. && $(TAR) cvhf privoxy-$(VERSION)-$(CODE_STATUS)-src.tar $$files ; \
+       cd .. && $(TAR) -cvhf --exclude "PACKAGERS" privoxy-$(VERSION)-$(CODE_STATUS)-src.tar $$files ; \
 
 # and zip the archive
        $(RM) ../privoxy-$(VERSION)-$(CODE_STATUS) 
@@ -505,13 +533,15 @@ tarball-clean:
 #
 #############################################################################
 
+# now works for swa
 # our style file
 doc/source/ldpOK.dsl:
-       if [ "$(DKPREFIX)" != "none" ]; then \
-               sed -e "s@/usr/share/sgml/docbook/dsssl-stylesheets@$(DKPREFIX)@g" doc/source/ldp.dsl > doc/source/ldpOK.dsl; \
-       else \
-               cp doc/source/ldp.dsl doc/source/ldpOK.dsl; \
-       fi
+#      if [ "$(DKPREFIX)" != "none" ]; then \
+#              sed -e "s@/usr/share/sgml/docbook/dsssl-stylesheets@$(DKPREFIX)@g" doc/source/ldp.dsl > doc/source/ldpOK.dsl; \
+#      else \
+#              cp doc/source/ldp.dsl doc/source/ldpOK.dsl; \
+#      fi
+       cp doc/source/ldp.dsl doc/source/ldpOK.dsl;
 
 # Otherwise we get plain groff conversion.
 groff2html:
@@ -566,7 +596,7 @@ dok-webserver: doc/source/ldpOK.dsl
      doc/webserver/index.html && rm -f doc/source/webserver/*.bak
 
 # Main documentation target.
-dok: dok-release dok-devel dok-user dok-faq dok-readme dok-webserver authors
+dok: dok-release dok-devel dok-user dok-faq dok-readme dok-webserver dok-authors
 # kludge to force recreation on next run. Rodgrigo?
        @rm -f doc/source/ldpOK.dsl
        @$(ECHO) Documentation created.
@@ -574,7 +604,7 @@ dok: dok-release dok-devel dok-user dok-faq dok-readme dok-webserver authors
 #
 # an alternative to the above dok. disabled man page creation for the moment
 #
-redhat-dok: dok-release dok-devel dok-user dok-faq redhat-readme dok-webserver authors
+redhat-dok: dok-release dok-devel dok-user dok-faq redhat-readme dok-webserver dok-authors
 # kludge to force recreation on next run. Rodgrigo?
        @rm -f doc/source/ldpOK.dsl
        @$(ECHO) Documentation created.
@@ -600,7 +630,7 @@ redhat-readme: doc/source/ldpOK.dsl
        @rm -f doc/source/ldpOK.dsl
 
 ## Make AUTHORS file
-authors: doc/source/ldpOK.dsl
+dok-authors: doc/source/ldpOK.dsl
        cd doc/source && $(DB) -V nochunks authors.sgml > tmp.html && $(WDUMP) \
          tmp.html > ../../AUTHORS && rm -f tmp.html
        # kludge to force recreation on next run. Rodgrigo?
@@ -645,12 +675,15 @@ else
 endif
 
 dok-pdf: doc/source/ldpOK.dsl dok-release 
-       cp doc/source/*.sgml doc/pdf
-       cp doc/source/*.dsl doc/pdf
-       cd doc/pdf && db2pdf --pdf -s ldpOK.dsl user-manual.sgml && mv user-manual.pdf privoxy-user-manual.pdf
-       cd doc/pdf && db2pdf --pdf -s ldpOK.dsl developer-manual.sgml && mv developer-manual.pdf privoxy-developer-manual.pdf
-       cd doc/pdf && db2pdf --pdf -s ldpOK.dsl faq.sgml && mv faq.pdf privoxy-faq.pdf
+       rm -f doc/pdf/*.pdf
+       cp -f doc/source/*.sgml doc/pdf
+       cp -f doc/source/*.dsl doc/pdf
+       cd doc/pdf && db2pdf --pdf -s ldpOK.dsl user-manual.sgml && mv user-manual.pdf privoxy-user-manual.pdf > /dev/null 2>&1
+       cd doc/pdf && db2pdf --pdf -s ldpOK.dsl developer-manual.sgml && mv developer-manual.pdf privoxy-developer-manual.pdf > /dev/null 2>&1
+       cd doc/pdf && db2pdf --pdf -s ldpOK.dsl faq.sgml && mv faq.pdf privoxy-faq.pdf > /dev/null 2>&1
        rm -f doc/pdf/*.sgml doc/pdf/*.dsl doc/pdf/*.out doc/pdf/*.tex doc/pdf/*.log doc/pdf/*.aux
+       # kludge to force recreation on next run. Rodgrigo?
+       @rm -f doc/source/ldpOK.dsl
 
 # the layout and style with db2pdf sucks, here is an alternative
 dok-pdf2: doc/source/ldpOK.dsl dok-release 
@@ -659,6 +692,8 @@ dok-pdf2: doc/source/ldpOK.dsl dok-release
        cd doc/source && $(DB) -V nochunks developer-manual.sgml > temp/privoxy-developer-manual.html
        cd doc/source && $(DB) -V nochunks faq.sgml > temp/privoxy-faq.html
 # one could use html2ps and ps2pdf. well, that does not work. htmlps produces incorrect output.
+       # kludge to force recreation on next run. Rodgrigo?
+       @rm -f doc/source/ldpOK.dsl
 
 #############################################################################
 #
@@ -768,7 +803,8 @@ tidy:
        $(RM) `find . -name ".\#*"`
 
 clobber: tidy
-       $(RM) GNUmakefile configure config.h.in config.h config.cache config.status config.log logfile privoxy.log core *.tar.gz *.tar
+       $(RM) GNUmakefile configure config.h.in config.h config.cache config.status config.log logfile privoxy.log core *.tar.gz *.tar privoxy-cl.spec doc/source/ldpOK.dsl
+
 #
 # FIXME: What is all this? 
 #
@@ -806,6 +842,30 @@ install: all
 ## end:
 
 # $Log: GNUmakefile.in,v $
+# Revision 1.94  2002/04/27 08:23:29  swa
+# pdf process reviewed and cleaned up
+#
+# Revision 1.93  2002/04/27 04:55:53  morcego
+# privoxy-cl.spec now gets removed by clobber target
+#
+# Revision 1.92  2002/04/27 04:53:40  morcego
+# Adding --exclude "PACKAGERS" to every tar command that applies (not for
+#   webserver target)
+#
+# Revision 1.91  2002/04/27 04:44:51  morcego
+# GNUmakefile.in: The tarball created on redhat-dist and suse-dist now ignore
+#   the PACKAGERS file, as well privoxy-cl.spec (in case it was created)
+# GNUmakefile.in: New targets -> conectiva-spec, conectiva-dist and
+#   conectiva-upload
+# genclspec.sh  : New file to generate, from privoxy-rh.spec, a specfile
+#   for Conectiva Linux
+#
+# Revision 1.90  2002/04/26 17:46:53  swa
+# be consistent
+#
+# Revision 1.89  2002/04/26 17:20:54  swa
+# just produce single html files to proces them later with Destiller or somesuch. looks prettier.
+#
 # Revision 1.88  2002/04/25 19:13:57  morcego
 # Removed RPM release number declaration on configure.in
 # Changed makefile to use given value for RPM_PACKAGEV when on uploading