Fixed bug #827619 (tar and rpm call syntax).
[privoxy.git] / GNUmakefile.in
index 5161009..18601df 100644 (file)
@@ -1,6 +1,6 @@
 # Note:  Makefile is built automatically from Makefile.in
 #
-# $Id: GNUmakefile.in,v 1.135 2002/11/04 05:11:05 hal9 Exp $
+# $Id: GNUmakefile.in,v 1.138 2003/10/17 17:51:58 oes Exp $
 #
 # Written by and Copyright (C) 2001 the SourceForge
 # Privoxy team. http://www.privoxy.org/
@@ -53,6 +53,7 @@ SNAPVERSION   = $(RPM_VERSION)-$(shell date "+%Y%m%d")
 DIR_PRIVOXY_ROOT     := .
 DIR_PRIVOXY_SRC      := $(DIR_PRIVOXY_ROOT)/src
 DIR_PRIVOXY_SRC_PCRE := $(DIR_PRIVOXY_ROOT)/pcre
+DIR_PRIVOXY_SRC_JAVA := $(DIR_PRIVOXY_ROOT)/src/java
 DIR_PRIVOXY_OBJ      := $(DIR_PRIVOXY_ROOT)/obj
 
 #############################################################################
@@ -132,7 +133,8 @@ SED       = sed
 GREP       = grep
 CAT        = cat
 RPM        = rpm
-MV           = mv
+RPMBUILD   = rpm
+MV        = mv
 TAR        = tar
 LN         = ln
 TOUCH      = touch
@@ -277,7 +279,7 @@ LDFLAGS = $(DEBUG_CFLAGS) $(SPECIAL_CFLAGS)
 #
 # There should NOT be any targets above this line.
 #############################################################################
-all: $(PROGRAM) default.action
+all: user-warned-once $(PROGRAM) default.action
 
 
 #############################################################################
@@ -287,7 +289,7 @@ all: $(PROGRAM) default.action
 suse-upload win-dist tarball-dist dok redhat-dok webserver clean clobber tags \
 install conectiva-spec conectiva-dist conectiva-upload debian-dist \
 debian-upload ensure-wdump ensure-jadebin ensure-dkprefix CONF_DEST LOG_DEST \
-PID_DEST check_doc install-strip uninstall GROUP_T
+PID_DEST check_doc install-strip uninstall GROUP_T java-activity-console
 
 
 #############################################################################
@@ -353,6 +355,41 @@ dist-check:
            if [ "$$answer" != "yes i am sure" ]; then exit 1; fi \
          fi;
 
+#############################################################################
+# One-time warning for unstable trunk version
+#############################################################################
+user-warned-once:
+       @if [ ! -f .user-has-been-warned ]; then \
+           $(ECHO) "****************************************************"; \
+           $(ECHO) "***                                              ***"; \
+           $(ECHO) "***       WARNING: LOTS OF TROUBLE AHEAD!        ***"; \
+           $(ECHO) "***       -------------------------------        ***"; \
+           $(ECHO) "***                                              ***"; \
+           $(ECHO) "*** You are about to compile the trunk (aka CVS  ***"; \
+           $(ECHO) "*** HEAD) version of Privoxy which contains a    ***"; \
+           $(ECHO) "*** zillion known bugs that are already fixed    ***"; \
+           $(ECHO) "*** in the stable branch, along with unfinished  ***"; \
+           $(ECHO) "*** features which will annoy you to death.      ***"; \
+           $(ECHO) "***                                              ***"; \
+           $(ECHO) "*** Unless you are developing or alpha-testing   ***"; \
+           $(ECHO) "*** Privoxy, THIS VERSION IS NOT FOR YOU! It is  ***"; \
+           $(ECHO) "*** UNSTABLE, LEAKY, UNDOCUMENTED, UNSUPPORTED!  ***"; \
+           $(ECHO) "***                                              ***"; \
+           $(ECHO) "*** If the latest release from www.privoxy.org   ***"; \
+           $(ECHO) "*** doesn't satisfy your bleeding-edge fetish,   ***"; \
+           $(ECHO) "*** check out the stable branch from CVS using   ***"; \
+           $(ECHO) "*** -r v_3_0_branch or use a snapshot from       ***"; \
+           $(ECHO) "*** http://www.oesterhelt.org/privoxy-snapshots/ ***"; \
+           $(ECHO) "***                                              ***"; \
+           $(ECHO) "*****************************************************"; \
+           $(ECHO) "Type \"yes i am sure\" if you are sure that you"; \
+           $(ECHO) -n "really want to proceed: "; \
+           read answer; \
+           if [ "$$answer" != "yes i am sure" ]; then exit 1; fi; \
+           touch .user-has-been-warned; \
+         fi;
+
+
 #############################################################################
 # create tar.gz from CVS:
 # This make-target is usually called through 'create-archive'. If you 
@@ -387,10 +424,10 @@ create-snapshot:
        fi; \
        $(RM) $(TMPFILE); \
        cd $(TMPDIR)/current; \
-       $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude \
-               "privoxy-suse.spec" -czf $(TMPDIR)/$(PROGRAM)-rh-$(VERSION).tar.gz .; \
-       $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude \
-               "privoxy-rh.spec" -czf $(TMPDIR)/$(PROGRAM)-suse-$(VERSION).tar.gz .
+       $(TAR) --exclude=".cvsignore" --exclude="CVS" --exclude="privoxy-suse.spec" \
+                -czf $(TMPDIR)/$(PROGRAM)-rh-$(VERSION).tar.gz .; \
+       $(TAR) --exclude=".cvsignore" --exclude="CVS" --exclude="privoxy-rh.spec" \
+                -czf $(TMPDIR)/$(PROGRAM)-suse-$(VERSION).tar.gz .
        @$(MV) -f $(TMPDIR)/$(PROGRAM)-rh-$(VERSION).tar.gz .
        @$(MV) -f $(TMPDIR)/$(PROGRAM)-suse-$(VERSION).tar.gz .
        @$(RM) -rf $(TMPDIR)
@@ -456,7 +493,7 @@ conectiva-spec:
 #############################################################################
 conectiva-dist: rpm-stuff conectiva-spec
 
-       $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-rh.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
+       $(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
 
@@ -468,14 +505,14 @@ conectiva-upload: check-release
 #############################################################################
 redhat-dist: rpm-stuff
        echo $(CONFIG_FILES)
-       $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
+       $(TAR) --exclude=".cvsignore" --exclude="CVS" --exclude="privoxy-suse.spec" --exclude="privoxy-cl.spec" --exclude="PACKAGERS" -czf $(TAR_ARCH) .
        $(RPMBUILD) --clean -ta  $(TAR_ARCH)
        if [ -f $(TAR_ARCH) ]; then  $(RM) $(TAR_ARCH); fi
 
 # For testing build issues only! Use redhat-dist for official releases.
 redhat-test: 
        echo $(CONFIG_FILES)
-       $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
+       $(TAR) --exclude=".cvsignore" --exclude="CVS" --exclude="privoxy-suse.spec" --exclude="privoxy-cl.spec" --exclude="PACKAGERS" -czf $(TAR_ARCH) .
        $(RPMBUILD) --clean -tb  $(TAR_ARCH)
        if [ -f $(TAR_ARCH) ]; then  $(RM) $(TAR_ARCH); fi
        @echo "WARNING: This target is only for testing. Use redhat-dist for releases!!!"
@@ -506,7 +543,7 @@ suse-dist: rpm-stuff
 #      exit 1;\
 #      fi
 
-       $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-rh.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -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
 
@@ -554,14 +591,14 @@ gen-dist: dist-check
        $(STRIP_PROG) $(PROGRAM)
        $(LN) -s current ../privoxy-$(VERSION)-$(CODE_STATUS)
 # add program
-       (cd .. && $(TAR) -cvhf --exclude "PACKAGERS" privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$(PROGRAM))
+       (cd .. && $(TAR) --exclude="PACKAGERS" -cvhf 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 --exclude "PACKAGERS" privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
+               (cd .. && $(TAR) --exclude="PACKAGERS" -uvhf 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 --exclude "PACKAGERS" privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
+               (cd .. && $(TAR) --exclude="PACKAGERS" -uvhf privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
        done;
 # and zip the archive
        $(RM) ../privoxy-$(VERSION)-$(CODE_STATUS)
@@ -685,6 +722,13 @@ tarball-upload:
 tarball-clean:
        $(RM) ../privoxy-$(VERSION)-$(CODE_STATUS)-src.tar.gz
 
+#############################################################################
+# java Activity Console 
+#############################################################################
+java-activity-console:
+       javac -classpath $(DIR_PRIVOXY_SRC_JAVA):$(CLASSPATH) $(DIR_PRIVOXY_SRC)/java/org/privoxy/activityconsole/*.java
+       jar -cvfm ActivityConsole.jar $(DIR_PRIVOXY_SRC_JAVA)/org/privoxy/activityconsole/acon.manifest -C $(DIR_PRIVOXY_SRC_JAVA) org/privoxy/activityconsole
+
 #############################################################################
 #
 # Documentation
@@ -885,7 +929,7 @@ install: CONF_DEST LOG_DEST PID_DEST check_doc GROUP_T
 #      if [ -n "$(GROUP_T)" ] && [ -n "$(USER)" ] && ! $(GROUPS) $(USER) | $(GREP) "\<$(GROUP_T)\>" >/dev/null; then \
 #              $(ECHO) Group $(GROUP_T) for User $(USER) is invalid && exit 1 ;\
 #      fi
-       
+
        @$(ECHO) "Creating directories, and preparing $(PROGRAM_V) installation"
        $(CHMOD) $(DIR_MODE) $(MKDIR)
        @$(MKDIR) $(SBIN_DEST) $(prefix) $(CONF_DEST) $(CONF_DEST)/templates $(SHARE_DEST) \
@@ -1071,7 +1115,7 @@ uninstall: CONF_DEST LOG_DEST PID_DEST check_doc
        done
        -@test -d $(CONF_DEST)/templates && $(RM) -r $(CONF_DEST)/templates &&\
        $(ECHO) "Removing $(CONF_DEST)/templates/*"
-       
+
        @# man page and docs
        @$(ECHO) Removing $(PROGRAM) docs
        -$(RM) $(MAN_DEST)/privoxy.1*
@@ -1145,6 +1189,16 @@ coffee:
 ## end:
 
 # $Log: GNUmakefile.in,v $
+# Revision 1.138  2003/10/17 17:51:58  oes
+# Added a one-time warning for compiling CVS HEAD
+#
+# Revision 1.137  2003/01/18 19:04:58  david__schmidt
+# Build support for the Java Activity Console - build with 'make java-activity-console', run with 'java -jar ActivityConsole.jar'
+#
+# Revision 1.136  2002/12/28 04:10:21  david__schmidt
+# Initial drop of dashboard instrumentation - enabled with
+# --enable-activity-console
+#
 # Revision 1.135  2002/11/04 05:11:05  hal9
 # Just a clean up of overly verbose output from install/uninstall.
 #