# Note: Makefile is built automatically from Makefile.in
#
-# $Id: GNUmakefile.in,v 1.110 2002/06/04 14:51:48 jongfoster Exp $
+# $Id: GNUmakefile.in,v 1.115 2002/09/05 19:13:04 hal9 Exp $
#
# Written by and Copyright (C) 2001 the SourceForge
# Privoxy team. http://www.privoxy.org/
CODE_STATUS = @CODE_STATUS@
VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_POINT)
RPM_VERSION = $(VERSION)
+RPM_PACKAGEV = ""
+SNAPVERSION = $(RPM_VERSION)-$(shell date "+%Y%m%d")
#############################################################################
RM = rm -f
STRIP_PROG = strip
SED = sed
+GREP = grep
CAT = cat
RPM = rpm
MV = mv
PERL = perl
DOC_DIR = doc/source
DOC_TMP = $(DOC_DIR)/tmp
-
+DKPREFIX = @DKPREFIX@
#User Group paras
USER = @USER@
REGEX_SRC =
@STATIC_PCRE_ONLY@REGEX_SRC = $(DIR_PRIVOXY_SRC_PCRE)/pcreposix.c
-REGEX_OBJS = $(REGEX_SRC:$(DIR_PRIVOXY_SRC_PCRE)/%.c=%.@OBJEXT@)
+REGEX_OBJS = $(REGEX_SRC:$(DIR_PRIVOXY_SRC_PCRE)/%.c=$(DIR_PRIVOXY_OBJ)/%.@OBJEXT@)
REGEX_HDRS = $(REGEX_SRC:.c=.h)
# Dependencies introduced by #include "project.h".
#
# There should NOT be any targets above this line.
#############################################################################
-all: $(PROGRAM)
+all: $(PROGRAM) default.action
#############################################################################
# Phony targets
#############################################################################
-.PHONY: all inifiles redhat-dist redhat-upload solaris-dist suse-dist \
+.PHONY: all inifiles redhat-dist redhat-upload redhat-test solaris-dist suse-dist \
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
$(DIR_PRIVOXY_OBJ):
mkdir obj
+#############################################################################
+# Strip master copy comments from default.action:
+#############################################################################
+default.action: default.action.master
+ $(GREP) -v '^#MASTER#' $< > $@
+
#############################################################################
# Win32 config files
#############################################################################
trust.txt: trust
$(DOSFILTER) < $< > $@
-re_filterfile.txt: re_filterfile
- $(DOSFILTER) < $< > $@
-
-
#############################################################################
# Pre-dist check:
#############################################################################
if [ "$$answer" != "yes i am sure" ]; then exit 1; fi \
fi;
+#############################################################################
+# create tar.gz from CVS:
+# This make-target is usually called through 'create-archive'. If you
+# run 'make create-snapshot' without setting SNAPVERSION, you'll get a
+# tar.gz with the current date in the name and as a releasenumber in the
+# spec-file. But the main usage is to run it as follows (Red Hat example):
+# make SNAPVERSION=1.6x create-snapshot
+# This creates a tar.gz and spec-file for a Red Hat 6.x version.
+#############################################################################
+create-snapshot:
+ @tag=`cvs -d $(CVSROOT) status Makefile | awk ' /Sticky Tag/ { print $$3 } '` 2> /dev/null; \
+ [ x"$$tag" = x"(none)" ] && tag=HEAD; \
+ echo "*** Creating package from $$tag!"; \
+ cd $(TMPDIR) ; cvs -Q -d $(CVSROOT) export -r $$tag current || echo "Um... export aborted."
+ @cd $(TMPDIR)/current; \
+ TMPFILE=$$(mktemp -q /tmp/$(PROGRAM).XXXXXX); \
+ if $(SED) -e 's/^\(Version:\).*/\1 $(RPM_VERSION)/g' \
+ -e 's/^\(Release:\).*/\1 $(SNAPVERSION)/g' \
+ privoxy-rh.spec > $$TMPFILE ; then \
+ $(MV) -f $$TMPFILE privoxy-rh.spec; \
+ else \
+ $(ECHO) "Could not set version info in specfile."; \
+ exit 1;\
+ fi;\
+ if $(SED) -e 's/^\(Version:\).*/\1 $(RPM_VERSION)/g' \
+ -e 's/^\(Release:\).*/\1 $(SNAPVERSION)/g' \
+ privoxy-suse.spec > $$TMPFILE ; then \
+ $(MV) -f $$TMPFILE privoxy-suse.spec; \
+ else \
+ $(ECHO) "Could not set version info in specfile."; \
+ exit 1;\
+ 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 .
+ @$(MV) -f $(TMPDIR)/$(PROGRAM)-rh-$(VERSION).tar.gz .
+ @$(MV) -f $(TMPDIR)/$(PROGRAM)-suse-$(VERSION).tar.gz .
+ @$(RM) -rf $(TMPDIR)
+ @echo "Resulting files are $(PROGRAM)-rh-$(VERSION).tar.gz and"
+ @echo " $(PROGRAM)-suse-$(VERSION).tar.gz"
+
#############################################################################
-# RPM specifice stuff (SuSE or Redhat, ..)
+# looks at the version of Makefile and exports a corresponding source-tree
+# example: if the Makefile has the sticky tag v_2_9_13, you'll get
+# privoxy-*-2.4.13.tar.gz. Two different tar files will be written, one for
+# Red Hat and one for SuSe (different spec-files)
+#############################################################################
+create-archive:
+ make SNAPVERSION=$(SNAPVERSION) create-snapshot
+
+
+#############################################################################
+# RPM specific stuff (SuSE or Redhat, ..)
#############################################################################
rpm-stuff: dist-check clean clobber
for dir in RPMS SRPMS BUILD SOURCES SPECS; do \
# redhat distribution alpha and x86
#############################################################################
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) .
+ $(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) .
- $(RPM) --clean -ta $(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!!!"
# anonymously ncftps the rpms to sourceforge
redhat-upload: check-release
$(RM) /usr/sbin/rcprivoxy
$(RM) /usr/share/man/man1/privoxy.1.gz
+
#############################################################################
# generic distribution
#############################################################################
@$(ECHO) it will not remove obsolete documents.
@$(ECHO) -------------------------------------------------------
- @$(ECHO) Uploading
+ @$(ECHO) Uploading html
@cd doc/webserver; \
upload=`find . -type f -a -not \( -path "*/CVS*" -o -path "*/results*" \)`; \
$(TAR) c $$upload | ssh ijbswa.sourceforge.net 'cd /home/groups/i/ij/ijbswa/htdocs/; tar xvm 2>&1 | grep -v timestamp'
+ @$(ECHO) Uploading pdf
+ @cd doc/pdf;\
+ zip privoxy-pdf-docs *.pdf ;\
+ scp -q privoxy-pdf-docs.zip ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/pdf
+
@$(ECHO) Fixing permissions
@ssh ijbswa.sourceforge.net 'chmod -R 775 /home/groups/i/ij/ijbswa/htdocs 2>/dev/null; true'
@ssh ijbswa.sourceforge.net 'find /home/groups/i/ij/ijbswa/htdocs/ -type f | xargs chmod 664 2>/dev/null; true'
$(DIR_PRIVOXY_OBJ)/urlmatch.@OBJEXT@: $(DIR_PRIVOXY_SRC)/urlmatch.c $(DIR_PRIVOXY_SRC)/urlmatch.h $(DIR_PRIVOXY_SRC)/config.h $(PROJECT_H_DEPS) $(DIR_PRIVOXY_SRC)/errlog.h $(DIR_PRIVOXY_SRC)/miscutil.h $(DIR_PRIVOXY_SRC)/ssplit.h
# PCRS
-$(DIR_PRIVOXY_OBJ)/pcrs.@OBJEXT@: $(DIR_PRIVOXY_SRC)/pcrs.c $(DIR_PRIVOXY_SRC_PCRE)/pcre.h $(DIR_PRIVOXY_SRC)/pcrs.h
+$(DIR_PRIVOXY_OBJ)/pcrs.@OBJEXT@: $(DIR_PRIVOXY_SRC)/pcrs.c $(DIR_PRIVOXY_SRC_PCRE)/pcre.h $(DIR_PRIVOXY_SRC)/pcrs.h $(DIR_PRIVOXY_SRC)/config.h
# PCRE
$(DIR_PRIVOXY_OBJ)/get.@OBJEXT@: $(DIR_PRIVOXY_SRC_PCRE)/get.c $(DIR_PRIVOXY_SRC_PCRE)/config.h $(DIR_PRIVOXY_SRC_PCRE)/internal.h $(DIR_PRIVOXY_SRC_PCRE)/pcre.h
# An auxiliary program makes the PCRE default character table source
-$(DIR_PRIVOXY_SRC_PCRE)/chartables.c: $(DIR_PRIVOXY_SRC_PCRE)/dftables@EXEEXT@
+$(DIR_PRIVOXY_SRC_PCRE)/chartables.c: $(DIR_PRIVOXY_OBJ)/dftables@EXEEXT@
$(DIR_PRIVOXY_SRC_PCRE)/dftables@EXEEXT@ >$(DIR_PRIVOXY_SRC_PCRE)/chartables.c
$(DIR_PRIVOXY_OBJ)/dftables@EXEEXT@: $(DIR_PRIVOXY_SRC_PCRE)/dftables.c $(DIR_PRIVOXY_SRC_PCRE)/maketables.c $(DIR_PRIVOXY_SRC_PCRE)/pcre.h $(DIR_PRIVOXY_SRC_PCRE)/internal.h $(DIR_PRIVOXY_SRC_PCRE)/config.h
clean:
$(RM) a.out $(OBJS) $(W32_FILES) $(W32_INIS) $(PROGRAM) \
- `find . -name TAGS -o -name tags`
+ default.action `find . -name TAGS -o -name tags`
tidy:
$(RM) `find . -name "*~"`
## end:
# $Log: GNUmakefile.in,v $
+# Revision 1.115 2002/09/05 19:13:04 hal9
+# Migrate Karstens make snapshot stuff (not tested).
+#
+# Revision 1.114 2002/09/05 11:58:30 oes
+# Synced in some changes fromm the stable branch:
+# From Revision 1.104.2.14 2002/08/10 11:19:37 oes:
+# - Add dependency: pcrs.o deps on config.h
+# Revision 1.104.2.9 2002/07/26 15:17:02 oes
+# - Added generation of default.action from defaul.action.master
+# - Deleted obsolete re_filterfile.txt generation
+#
+# Revision 1.113 2002/07/30 21:50:25 hal9
+# Add redhat-test target, and migrate the RPM_PACKAGEV stuff from 3.0 branch.
+#
+# Revision 1.112 2002/06/28 18:30:10 jongfoster
+# Fixing bugs compiling PCRE
+#
+# Revision 1.111 2002/06/05 00:26:21 hal9
+# Move all doc build stuff to doc/source/GNUmakefile, leaving a 'make dok'
+# target only in toplevel. Add DOC_STATUS variable so docs can be built without
+# touching sgml source.
+#
# Revision 1.110 2002/06/04 14:51:48 jongfoster
# Updating for new paths:
# - Source files in src/