1 # Note: Makefile is built automatically from Makefile.in
3 # $Id: GNUmakefile.in,v 1.104.2.20 2002/10/25 02:44:22 hal9 Exp $
5 # Written by and Copyright (C) 2001 the SourceForge
6 # Privoxy team. http://www.privoxy.org/
8 # Based on the Internet Junkbuster originally written
9 # by and Copyright (C) 1997 Anonymous Coders and
10 # Junkbusters Corporation. http://www.junkbusters.com
12 # This program is free software; you can redistribute it
13 # and/or modify it under the terms of the GNU General
14 # Public License as published by the Free Software
15 # Foundation; either version 2 of the License, or (at
16 # your option) any later version.
18 # This program is distributed in the hope that it will
19 # be useful, but WITHOUT ANY WARRANTY; without even the
20 # implied warranty of MERCHANTABILITY or FITNESS FOR A
21 # PARTICULAR PURPOSE. See the GNU General Public
22 # License for more details.
24 # The GNU General Public License should be included with
25 # this file. If not, you can view it at
26 # http://www.gnu.org/copyleft/gpl.html
27 # or write to the Free Software Foundation, Inc., 59
28 # Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 #############################################################################
32 # Set make command correctly
33 #############################################################################
36 #############################################################################
37 # Version number (for RPM)
38 #############################################################################
40 VERSION_MAJOR = @VERSION_MAJOR@
41 VERSION_MINOR = @VERSION_MINOR@
42 VERSION_POINT = @VERSION_POINT@
43 CODE_STATUS = @CODE_STATUS@
44 VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_POINT)
45 RPM_VERSION = $(VERSION)
47 SNAPVERSION = $(RPM_VERSION)-$(shell date "+%Y%m%d")
50 #############################################################################
51 # "make install" directories and variables
52 #############################################################################
59 exec_prefix = @exec_prefix@
60 CONF_BASE = @sysconfdir@
63 MAN_DEST = $(MAN_DIR)/man1
64 SHARE_DEST = @datadir@
65 DOC_DEST = $(SHARE_DEST)/doc/privoxy
66 VAR_DEST = @localstatedir@
67 LOGS_DEST = $(VAR_DEST)/log/privoxy
68 PIDS_DEST = $(VAR_DEST)/run
70 # if $prefix = /usr/local then the default CONFDEST change from
71 # CONF_DEST = $(CONF_BASE) to CONF_DEST = $(CONF_BASE)/privoxy
72 # by the target rule CONF_DEST
74 # also if the $prefix is /usr/local and there is no
75 # $(SHARE_DEST)/doc, it checks for $prefix/doc and installs there
76 # instead in this situation
78 # finally if $prefix=/usr/local and VAR_DEST=$prefix/var it
79 # changes this to /var for storing the logs and pidfile
81 # used in source dir only, the install goes to $share_dest/doc/privoxy
82 DOK_WEB = doc/webserver/
84 # Install usage should be compatible with install-sh.
88 # Support files, docs, etc.
92 # Files daemon writes to.
94 INSTALL_P = -m $(BIN_MODE)
95 INSTALL_T = -m $(RA_MODE)
96 INSTALL_D = -m $(DIR_MODE) -d
97 INSTALL_R = -m $(RWD_MODE)
99 # install options for superuser install
100 #INSTALL_S = -g @GROUP@ -o @USER@
102 #############################################################################
104 #############################################################################
106 PROGRAM = privoxy@EXEEXT@
111 # id -u is not universal. FIXME: need to set from configure. Breaks on
119 MKDIR = ./mkinstalldirs
135 WDUMP = @WDUMP@ -dump
138 DB = $(JADEBIN) $(JADECAT) -ihtml -t sgml -D.. -d ldp.dsl\#html
140 MAN2HTML = @MAN2HTML@
141 G2H_CMD = groff -mandoc -Thtml
145 DOC_TMP = $(DOC_DIR)/tmp
146 DOC_STATUS = @DOC_STATUS@
148 # Program to do LF->CRLF
150 # The sed version should be the most portable, but it doesn't for for me,
151 # the other two do. FIXME.
153 #DOSFILTER = $(SED) -e $$'s,$$,\r,'
154 #DOSFILTER = gawk -v ORS='\r\n' '{print $0;}'
155 DOSFILTER = $(PERL) -p -e 's/\n/\r\n/'
156 CVSROOT = :pserver:anonymous@cvs.ijbswa.sourceforge.net:/cvsroot/ijbswa
157 TMPDIR := $(shell mktemp -d /tmp/$(PROGRAM).XXXXXX)
159 #############################################################################
160 # Setup for make distribution rh and suse for now
161 #############################################################################
163 TAR_ARCH = /tmp/privoxy-$(RPM_VERSION).tar.gz
164 RPM_BASE = @RPM_BASE@
166 #############################################################################
167 # We include these files in our distributions
168 #############################################################################
169 CONFIGS = config trust default.action standard.action user.action default.filter
170 # take care that no CVS .cvsignore or other crappy files
172 # and escape every '#' in the find. doh.
173 CONFIG_FILES = $(CONFIGS) \
174 `find templates/ -type f | grep -v "CVS" | grep -v "\.\#" | grep -v ".*~" | grep -v ".cvsignore" | grep -v "TAGS"`
176 DOC_FILES = AUTHORS LICENSE README ChangeLog INSTALL \
177 `find doc/text/ -type f | grep -v "CVS" | grep -v "\.\#" | grep -v ".*~" | grep -v ".cvsignore" | grep -v "TAGS"` \
178 `find doc/webserver/ -name "*.html" | grep -v "\(webserver\|team\)\/index\.html"` \
179 `find doc/webserver/ -name "*.css"` \
183 #############################################################################
184 # Filenames and libraries
185 #############################################################################
187 C_SRC = actions.c cgi.c cgiedit.c cgisimple.c deanimate.c encode.c \
188 errlog.c filters.c gateway.c jbsockets.c jcc.c killpopup.c \
189 list.c loadcfg.c loaders.c miscutil.c parsers.c ssplit.c \
192 C_OBJS = $(C_SRC:.c=.@OBJEXT@)
193 C_HDRS = $(C_SRC:.c=.h) project.h actionlist.h
195 W32_SRC = @WIN_ONLY@w32log.c w32taskbar.c win32.c
196 W32_FILES = @WIN_ONLY@w32.res
197 W32_OBJS = @WIN_ONLY@$(W32_SRC:.c=.@OBJEXT@) $(W32_FILES)
198 W32_HDRS = @WIN_ONLY@w32log.h w32taskbar.h win32.h w32res.h
199 W32_LIB = @WIN_ONLY@-lwsock32 -lcomctl32
200 W32_INIS = @WIN_ONLY@config.txt trust.txt
202 PCRS_SRC = @STATIC_PCRS_ONLY@pcrs.c
203 PCRS_OBJS = @STATIC_PCRS_ONLY@$(PCRS_SRC:.c=.@OBJEXT@)
204 PCRS_HDRS = @STATIC_PCRS_ONLY@$(PCRS_SRC:.c=.h)
206 PCRE_SRC = @STATIC_PCRE_ONLY@pcre/get.c pcre/maketables.c pcre/study.c pcre/pcre.c
207 PCRE_OBJS = @STATIC_PCRE_ONLY@$(PCRE_SRC:.c=.@OBJEXT@)
208 PCRE_HDRS = @STATIC_PCRE_ONLY@pcre/config.h pcre/chartables.c pcre/internal.h pcre/pcre.h
210 # No REGEX (maybe because dynamically linked pcreposix):
212 @STATIC_PCRE_ONLY@REGEX_SRC = pcre/pcreposix.c
214 REGEX_OBJS = $(REGEX_SRC:.c=.@OBJEXT@)
215 REGEX_HDRS = $(REGEX_SRC:.c=.h)
217 # Dependencies introduced by #include "project.h".
218 PROJECT_H_DEPS = project.h $(REGEX_HDRS) $(PCRS_HDRS) @STATIC_PCRE_ONLY@pcre/pcre.h
220 # Socket libraries for platforms that need them explicitly defined
221 SOCKET_LIB = @SOCKET_LIB@
223 # PThreads library, if needed.
224 PTHREAD_LIB = @PTHREAD_ONLY@@PTHREAD_LIB@
226 SRCS = $(C_SRC) $(W32_SRC) $(PCRS_SRC) $(PCRE_SRC) $(REGEX_SRC)
227 OBJS = $(C_OBJS) $(W32_OBJS) $(PCRS_OBJS) $(PCRE_OBJS) $(REGEX_OBJS)
228 HDRS = $(C_HDRS) $(W32_HDRS) $(PCRS_HDRS) $(PCRE_OBJS) $(REGEX_HDRS)
229 LIBS = @LIBS@ $(W32_LIB) $(SOCKET_LIB) $(PTHREAD_LIB)
232 #############################################################################
234 #############################################################################
236 # The flag "-mno-win32" can be used by Cygwin to emulate a un?x type build.
237 # The flag "-mwindows -mno-cygwin" will cause Cygwin to use MingW32 for a
239 # The flag "-pthread" is required if using Pthreads under Linux (and
240 # possibly other OSs).
241 SPECIAL_CFLAGS = @SPECIAL_CFLAGS@
243 # Add your flags here
246 CFLAGS = @CFLAGS@ @CPPFLAGS@ $(OTHER_CFLAGS) $(SPECIAL_CFLAGS) -Wall \
247 @STATIC_PCRE_ONLY@ -Ipcre
249 LDFLAGS = $(DEBUG_CFLAGS) $(SPECIAL_CFLAGS)
252 #############################################################################
255 # There should NOT be any targets above this line.
256 #############################################################################
257 all: $(PROGRAM) default.action
260 #############################################################################
262 #############################################################################
263 .PHONY: all inifiles redhat-dist redhat-upload solaris-dist suse-dist \
264 suse-upload win-dist tarball-dist dok redhat-dok webserver clean clobber tags \
265 install conectiva-spec conectiva-dist conectiva-upload CONF_DEST LOG_DEST \
266 PID_DEST check_doc install-strip uninstall GROUP_T
268 #############################################################################
269 # Define this explicitly because Solaris is broken!
270 #############################################################################
272 $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
275 #############################################################################
276 # Strip master copy comments from default.action:
277 #############################################################################
278 default.action: default.action.master
279 $(GREP) -v '^#MASTER#' $< > $@
281 #############################################################################
283 #############################################################################
285 inifiles: $(W32_INIS)
288 $(SED) -e 's!\trustfile trust!trustfile trust.txt!' \
289 -e 's!\jarfile jarfile!jarfile jar.log!' \
290 -e 's!\logfile logfile!logfile privoxy.log!' \
291 -e 's!#Win32-only: !!' \
294 # LF to CRLF in default.action
295 $(DOSFILTER) <default.action >default.action.txt && mv default.action.txt default.action
296 # LF to CRLF in default.filter
297 $(DOSFILTER) <default.filter >default.filter.txt && mv default.filter.txt default.filter
300 $(DOSFILTER) < $< > $@
302 #############################################################################
304 #############################################################################
306 @if [ -d CVS ]; then \
307 $(ECHO) "***************************************************"; \
309 $(ECHO) "*** WARNING ***"; \
311 $(ECHO) "*** The presence of a CVS subdirectory suggests ***"; \
312 $(ECHO) "*** that you are trying to build a distribution ***"; \
313 $(ECHO) "*** package based on a checked out, not an ***"; \
314 $(ECHO) "*** exported copy of the source tree. Please ***"; \
315 $(ECHO) "*** see \"Releasing a new version\" in the ***"; \
316 $(ECHO) "*** developer manual. ***"; \
318 $(ECHO) "***************************************************"; \
319 $(ECHO) "Type \"yes i am sure\" if you are sure that you"; \
320 $(ECHO) -n "really want to proceed: "; \
322 if [ "$$answer" != "yes i am sure" ]; then exit 1; fi \
326 #############################################################################
327 # create tar.gz from CVS:
328 # This make-target is usually called through 'create-archive'. If you
329 # run 'make create-snapshot' without setting SNAPVERSION, you'll get a
330 # tar.gz with the current date in the name and as a releasenumber in the
331 # spec-file. But the main usage is to run it as follows (Red Hat example):
332 # make SNAPVERSION=1.6x create-snapshot
333 # This creates a tar.gz and spec-file for a Red Hat 6.x version.
334 #############################################################################
336 @tag=`cvs -d $(CVSROOT) status Makefile | awk ' /Sticky Tag/ { print $$3 } '` 2> /dev/null; \
337 [ x"$$tag" = x"(none)" ] && tag=HEAD; \
338 echo "*** Creating package from $$tag!"; \
339 cd $(TMPDIR) ; cvs -Q -d $(CVSROOT) export -r $$tag current || echo "Um... export aborted."
340 @cd $(TMPDIR)/current; \
341 TMPFILE=$$(mktemp -q /tmp/$(PROGRAM).XXXXXX); \
342 if $(SED) -e 's/^\(Version:\).*/\1 $(RPM_VERSION)/g' \
343 -e 's/^\(Release:\).*/\1 $(SNAPVERSION)/g' \
344 privoxy-rh.spec > $$TMPFILE ; then \
345 $(MV) -f $$TMPFILE privoxy-rh.spec; \
347 $(ECHO) "Could not set version info in specfile."; \
350 if $(SED) -e 's/^\(Version:\).*/\1 $(RPM_VERSION)/g' \
351 -e 's/^\(Release:\).*/\1 $(SNAPVERSION)/g' \
352 privoxy-suse.spec > $$TMPFILE ; then \
353 $(MV) -f $$TMPFILE privoxy-suse.spec; \
355 $(ECHO) "Could not set version info in specfile."; \
359 cd $(TMPDIR)/current; \
360 $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude \
361 "privoxy-suse.spec" -czf $(TMPDIR)/$(PROGRAM)-rh-$(VERSION).tar.gz .; \
362 $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude \
363 "privoxy-rh.spec" -czf $(TMPDIR)/$(PROGRAM)-suse-$(VERSION).tar.gz .
364 @$(MV) -f $(TMPDIR)/$(PROGRAM)-rh-$(VERSION).tar.gz .
365 @$(MV) -f $(TMPDIR)/$(PROGRAM)-suse-$(VERSION).tar.gz .
367 @echo "Resulting files are $(PROGRAM)-rh-$(VERSION).tar.gz and"
368 @echo " $(PROGRAM)-suse-$(VERSION).tar.gz"
371 #############################################################################
372 # looks at the version of Makefile and exports a corresponding source-tree
373 # example: if the Makefile has the sticky tag v_2_9_13, you'll get
374 # privoxy-*-2.4.13.tar.gz. Two different tar files will be written, one for
375 # Red Hat and one for SuSe (different spec-files)
376 #############################################################################
378 make SNAPVERSION=$(SNAPVERSION) create-snapshot
380 #############################################################################
381 # RPM specifice stuff (SuSE or Redhat, ..)
382 #############################################################################
383 rpm-stuff: dist-check clean clobber
384 for dir in RPMS SRPMS BUILD SOURCES SPECS; do \
385 if [ ! -w $(RPM_BASE)/$$dir ]; then \
386 $(ECHO) "$(RPM_BASE)/$$dir is not writable for you. Maybe try as root."; \
387 $(ECHO) "Or add a suitable path to .rpmmacros like."; \
388 $(ECHO) "%_topdir /home/foo/rpm-build"; \
394 @if [ "$(RPM_PACKAGEV)" = "" ]; then \
396 echo " ERROR: NO RPM_PACKAGEV VALUE"; \
397 echo " No value given for RPM_PACKAGEV. Please use:"; \
398 echo " make dist-upload RPM_PACKAGEV=release"; \
399 echo " where \"release\" is the release number you want to and"; \
400 echo " where \"dist\" is the name of the distro (redhat or suse)"; \
402 echo " Ex: make redhat-upload RPM_PACKAGEV=1"; \
404 echo "ATTENTION: If your distribution use a specific tag on the"; \
405 echo " release field (like \"cl\" for Conectiva, and"; \
406 echo " \"mdk\" for Mandrake), DO NOT put it on the value"; \
407 echo " given to RPM_PACKAGEV. It will be added automaticaly."; \
408 echo " Do it like you would do for a redhat package,"; \
409 echo " (i.e. just the number)."; \
415 #############################################################################
416 # Create Conectiva specfile from RedHat specfile
417 #############################################################################
419 $(RM) privoxy-cl.spec
420 chmod a+x genclspec.sh
423 #############################################################################
424 # Conectiva distribution for x86
425 #############################################################################
426 conectiva-dist: rpm-stuff conectiva-spec
428 $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-rh.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
429 $(RPMBUILD) --clean -ta $(TAR_ARCH)
430 if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi
432 conectiva-upload: check-release
433 make redhat-upload RPM_PACKAGEV=$(RPM_PACKAGEV)cl
435 #############################################################################
436 # redhat distribution alpha and x86
437 #############################################################################
438 redhat-dist: rpm-stuff
440 $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
441 $(RPMBUILD) --clean -ta $(TAR_ARCH)
442 if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi
444 # For testing build issues only! Use redhat-dist for official releases.
447 $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
448 $(RPMBUILD) --clean -tb $(TAR_ARCH)
449 if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi
450 @echo "WARNING: This target is only for testing. Use redhat-dist for releases!!!"
452 # anonymously ncftps the rpms to sourceforge
453 redhat-upload: check-release
454 ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/SRPMS/privoxy-$(RPM_VERSION)-$(RPM_PACKAGEV).src.rpm
455 # better should use `arch` here instead of ix86 to support other platforms too
456 ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/RPMS/*/privoxy-$(RPM_VERSION)-$(RPM_PACKAGEV).*.rpm
457 @$(ECHO) -------------------------------------------------------
459 @$(ECHO) http://sourceforge.net/project/admin/editpackages.php?group_id=11118
460 @$(ECHO) ... and release the files.
461 @$(ECHO) -------------------------------------------------------
462 # w3m http://sourceforge.net/project/admin/editpackages.php?group_id=11118
465 #############################################################################
466 # Creates a Red Hat sourcepackage from CVS (not from the current sources
468 #############################################################################
471 $(MV) $(PROGRAM)-rh-$(VERSION).tar.gz $(PROGRAM)-$(VERSION).tar.gz
472 $(RPMBUILD) -ts --nodeps $(PROGRAM)-$(VERSION).tar.gz
475 #############################################################################
476 # suse distribution. works fine. no need to be root.
477 #############################################################################
479 # TMPFILE=$$(mktemp -q /tmp/$(PROGRAM).XXXXXX); \
480 # if $(SED) -e 's/^\(Version:\).*/\1 $(RPM_VERSION)/g' \
481 # -e 's/^\(Release:\).*/\1 $(RPM_PACKAGEV)/g' \
482 # privoxy-suse.spec > $$TMPFILE ; then \
483 # $(MV) -f $$TMPFILE privoxy-suse.spec; \
485 # $(ECHO) "Could not set version info in specfile."; \
489 $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-rh.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
490 $(RPM) --clean -ta $(TAR_ARCH)
491 if [ -f $(TAR_ARCH) ]; then $(RM) $(TAR_ARCH); fi
493 # anonymously ncftps the rpms to sourceforge
494 suse-upload: check-release
495 ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/SRPMS/privoxy-suse-$(RPM_VERSION)-$(RPM_PACKAGEV).src.rpm
496 # better should use `arch` here instead of ix86 to support other platforms too
497 ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/RPMS/*/privoxy-suse-$(RPM_VERSION)-$(RPM_PACKAGEV).*.rpm
498 @$(ECHO) -------------------------------------------------------
500 @$(ECHO) http://sourceforge.net/project/admin/editpackages.php?group_id=11118
501 @$(ECHO) ... and release the files.
502 @$(ECHO) -------------------------------------------------------
504 # handle with care. use with root.
506 $(RPM) -e junkbuster-suse || true
507 $(RM) -r /etc/junkbuster
508 $(RM) -r /etc/rc.d/junkbuster*
509 $(RM) -r /var/run/junkbuster.pid
510 $(RM) -r /var/log/junkbuster
511 $(RM) /etc/init.d/junkbuster
512 $(RM) /usr/sbin/junkbuster
513 $(RM) /usr/sbin/rcjunkbuster
514 $(RM) /usr/share/man/man1/junkbuster.1.gz
515 $(RPM) -e privoxy-suse || true
516 $(RM) -r /etc/privoxy
517 $(RM) -r /etc/rc.d/privoxy*
518 $(RM) -r /var/run/privoxy.pid
519 $(RM) -r /var/log/privoxy
520 $(RM) /etc/init.d/privoxy
521 $(RM) /usr/sbin/privoxy
522 $(RM) /usr/sbin/rcprivoxy
523 $(RM) /usr/share/man/man1/privoxy.1.gz
525 #############################################################################
526 # generic distribution
527 #############################################################################
530 @$(ECHO) "You have run autoconf && autoheader && ./configure right?"
533 $(STRIP_PROG) $(PROGRAM)
534 $(LN) -s current ../privoxy-$(VERSION)-$(CODE_STATUS)
536 (cd .. && $(TAR) -cvhf --exclude "PACKAGERS" privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$(PROGRAM))
538 for foo in $(CONFIG_FILES); do \
539 (cd .. && $(TAR) -uvhf --exclude "PACKAGERS" privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
542 for foo in $(DOC_FILES); do \
543 (cd .. && $(TAR) -uvhf --exclude "PACKAGERS" privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
545 # and zip the archive
546 $(RM) ../privoxy-$(VERSION)-$(CODE_STATUS)
547 $(GZIP_PROG) ../privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar
548 @$(ECHO) Distribution with binary created.
550 # anonymously ncftps the package to sourceforge
552 ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming ../privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar.gz
553 @$(ECHO) -------------------------------------------------------
555 @$(ECHO) http://sourceforge.net/project/admin/editpackages.php?group_id=11118
556 @$(ECHO) ... and release the files.
557 @$(ECHO) -------------------------------------------------------
561 $(RM) privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar*
563 #############################################################################
564 # solaris distribution. verified on SF machines by swa.
565 #############################################################################
566 solaris-dist: gen-dist
568 # anonymously ncftps the package to sourceforge
569 solaris-upload: gen-upload
572 solaris-clean: gen-clean
575 #############################################################################
577 #############################################################################
579 @$(ECHO) coming soon.
581 @$(ECHO) coming soon.
583 #############################################################################
584 # debian distribution
585 #############################################################################
587 @$(ECHO) coming soon.
589 @$(ECHO) coming soon.
591 #############################################################################
592 # macosx distribution
593 #############################################################################
595 @$(ECHO) coming soon.
597 @$(ECHO) coming soon.
599 #############################################################################
601 #############################################################################
603 @$(ECHO) coming soon.
605 @$(ECHO) coming soon.
607 #############################################################################
608 # freebsd distribution. verified on SF machines by swa.
609 #############################################################################
610 freebsd-dist: gen-dist
612 # anonymously ncftps the package to sourceforge
613 freebsd-upload: gen-upload
616 freebsd-clean: gen-clean
619 #############################################################################
620 # Windows distribution
621 #############################################################################
623 $(ECHO) Not implemented.
626 #############################################################################
627 # Tarball distribution: No CVS dirs, dotfiles, debian build dir,
628 # (FIXME:) only parts of the static / generated docs mix in doc/webserver
629 #############################################################################
631 tarball-dist: dist-check clean clobber
632 $(LN) -s current ../privoxy-$(VERSION)-$(CODE_STATUS)
634 for i in `find . -type f -a -not \( -path "*/CVS*" -o -name ".*" \
635 -o -path "*/debian/*" -o -path "*/actions/*" -o -name "*.php" -o -name "PACKAGERS" \)`; do \
636 files="$$files privoxy-$(VERSION)-$(CODE_STATUS)/$$i"; \
638 cd .. && $(TAR) -cvhf privoxy-$(VERSION)-$(CODE_STATUS)-src.tar $$files ; \
640 # and zip the archive
641 $(RM) ../privoxy-$(VERSION)-$(CODE_STATUS)
642 $(GZIP_PROG) ../privoxy-$(VERSION)-$(CODE_STATUS)-src.tar
643 @$(ECHO) Tarball distribution created.
645 # anonymously ncftps the tarball to sourceforge
647 ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming ../privoxy-$(VERSION)-$(CODE_STATUS)-src.tar.gz
648 @$(ECHO) -------------------------------------------------------
650 @$(ECHO) http://sourceforge.net/project/admin/editpackages.php?group_id=11118
651 @$(ECHO) ... and release the files.
652 @$(ECHO) -------------------------------------------------------
655 $(RM) ../privoxy-$(VERSION)-$(CODE_STATUS)-src.tar.gz
657 #############################################################################
661 # converts doc/source/*.sgml into html, text and man pages
663 #############################################################################
667 $(RM) doc/webserver/developer-manual/*.html
668 $(RM) -r doc/source/developer-manual
669 mkdir -p doc/text doc/source/developer-manual
670 cd doc/source/developer-manual && $(DB) ../developer-manual.sgml && cd .. && cp developer-manual/*.html ../webserver/developer-manual/
671 cd doc/source && $(DB) -V nochunks developer-manual.sgml > tmp.html && $(WDUMP) tmp.html > ../text/developer-manual.txt && $(RM) -r tmp.html developer-manual
675 $(RM) doc/webserver/user-manual/*.html
676 $(RM) -r doc/source/user-manual/
677 mkdir -p doc/text doc/source/user-manual
678 cd doc/source/user-manual && $(DB) -iuser-man ../user-manual.sgml && cd .. && cp user-manual/*.html ../webserver/user-manual/
679 cd doc/source && $(DB) -iuser-man -V nochunks user-manual.sgml > tmp.html && $(WDUMP) tmp.html > ../text/user-manual.txt && $(RM) -r tmp.html user-manual
683 $(RM) doc/webserver/faq/*.html
684 $(RM) -r doc/source/faq
685 mkdir -p doc/text doc/source/faq
686 cd doc/source/faq && $(DB) ../faq.sgml && cd .. && cp faq/*.html ../webserver/faq/
687 cd doc/source && $(DB) -V nochunks faq.sgml > tmp.html && $(WDUMP) tmp.html > ../text/faq.txt && $(RM) -r tmp.html faq
689 # man page, one variation. Try to use the next target, just 'make man'.
691 $(RM) doc/man/* doc/webserver/man-page/*.html
692 ifneq ($(MAN2HTML),false)
693 $(ECHO) "<html><head><title>Privoxy Man page</title><link rel=\"stylesheet\" type=\"text/css\" href=\"../p_web.css\"></head><body><H2>NAME</H2>" > doc/webserver/man-page/privoxy-man-page.html
694 man ./privoxy.1 | $(MAN2HTML) -bare >> doc/webserver/man-page/privoxy-man-page.html
695 $(ECHO) "</body></html>" >> doc/webserver/man-page/privoxy-man-page.html
700 # Build man page from sgml. This requires the SGMLSpm perl module.
701 # See CPAN, or your favorite perl repository. This is the preferred
702 # target for man page generation!
704 mkdir -p doc/source/temp && cd doc/source/temp && $(RM) * ;\
705 nsgmls ../privoxy-man-page.sgml | sgmlspl ../../../utils/docbook2man/docbook2man-spec.pl &&\
706 perl -pi.bak -e 's/ <URL:.*>//; s/\[ /\[/g' privoxy.1 ;\
707 $(DB) ../privoxy-man-page.sgml && $(MV) -f privoxy.1 ../../../privoxy.1
709 # For those with man2html ala RH7s.
711 mkdir -p doc/webserver/man-page
712 ifneq ($(MAN2HTML),false)
713 $(MAN2HTML) privoxy.1 |grep -v "^Content-type" > tmp.html
714 $(PERL) -pi.bak -e 's/<A .*Contents<\/A>//; s/<A .*man2html<\/A>/man2html/' tmp.html
715 $(PERL) -pi.bak -e 's/(<\/HEAD>)/<LINK REL=\"STYLESHEET\" TYPE=\"text\/css\" HREF=\"..\/p_doc.css\"><\/HEAD>/' tmp.html
716 # Twice because my version of man2html is pulling in commas and periods in URLs.
717 $(PERL) -pi.bak -e 's/(<A.*),(">)/$$1$$2/g' tmp.html
718 $(PERL) -pi.bak -e 's,\.">,">,g' tmp.html
719 # Get rid of spurious
\a from conversion. (How to do this with perl?)
720 $(SED) -e 's/
\a//g' tmp.html > doc/webserver/man-page/privoxy-man-page.html && $(RM) tmp.*
726 # Otherwise we get plain groff conversion.
728 $(G2H_CMD) ./privoxy.1 | $(SED) -e 's@</head>@<link REL="STYLESHEET" TYPE="text/css" HREF="../p_doc.css"></head>@' > doc/webserver/man-page/privoxy-man-page.html
731 # readme page and INSTALL file
732 dok-readme: dok-release
733 cd doc/source && $(DB)-notoc -V nochunks readme.sgml > tmp.html &&\
734 $(WDUMP) tmp.html > ../../README ;\
735 $(DB)-notoc -V nochunks install.sgml > tmp.html &&\
736 $(WDUMP) tmp.html > ../../INSTALL ;\
739 # index.sgml is used to create both the Home Page, and a local index
740 # for documentation, etc.
742 # index.html for webserver:
744 cd doc/source/webserver && $(DB)-notoc -ip-homepage -V nochunks index.sgml > ../../webserver/index.html
745 $(PERL) -pi.bak -e 's/..\/p_doc.css/p_doc.css/;\
746 s/<\/HEAD/\n<meta name=\"description\" content=\"Privoxy helps consumers reduce unwanted junk email and protect their privacy from direct marketing companies.\"><\/HEAD/;\
747 s/<\/HEAD/\n<meta name="MSSmartTagsPreventParsing" content="TRUE"><\/HEAD/;\
749 doc/webserver/index.html && $(RM) doc/webserver/*.bak
751 # privoxy-index.html for local documentation:
753 cd doc/source/webserver && $(DB)-notoc -ip-index -V nochunks index.sgml > ../../webserver/privoxy-index.html
754 $(PERL) -pi.bak -e 's/..\/p_doc.css/p_doc.css/;\
755 s/<\/HEAD/\n<meta name=\"description\" content=\"Privoxy helps consumers reduce unwanted junk email and protect their privacy from direct marketing companies.\"><\/HEAD/;\
756 s/<\/HEAD/\n<meta name="MSSmartTagsPreventParsing" content="TRUE"><\/HEAD/;\
758 doc/webserver/privoxy-index.html && $(RM) doc/webserver/*.bak
761 # Main documentation target.
762 dok: dok-release dok-devel dok-user dok-faq dok-readme dok-webserver dok-authors dok-index
763 @$(ECHO) Documentation created.
766 # an alternative to the above dok. disabled man page creation for the moment
768 redhat-dok: dok-release dok-devel dok-user dok-faq redhat-readme dok-webserver dok-authors
769 @$(ECHO) Documentation created.
773 cd doc/source && $(DB)-notoc -V nochunks readme.sgml > tmp.html && $(WDUMP) \
774 tmp.html > ../../README && $(RM) -r tmp.html
778 cd doc/source && $(DB) -V nochunks authors.sgml > tmp.html && $(WDUMP) \
779 tmp.html > ../../AUTHORS && $(RM) tmp.html
781 # Set doc entities for VERSION and CODE_STATUS in sgml docs. Toggle content
782 # exceptions accordingly. This needs to go before any doc building (doh).
784 @$(ECHO) Setting doc version and status to $(VERSION), $(CODE_STATUS)
785 @$(PERL) -pi.bak -e 's/<!entity +p-version.*>/<!entity p-version "$(VERSION)">/;\
786 s/<!entity +p-status.*>/<!entity p-status "$(CODE_STATUS)">/' \
787 doc/source/*sgml doc/source/*/*sgml
788 $(RM) -r doc/source/*bak doc/source/*/*bak
789 ifeq ($(CODE_STATUS),stable)
790 @$(ECHO) Setting docs to stable $(VERSION)
791 @$(PERL) -pi.bak -e 's/<!entity +% +p-stable.*>/<!entity % p-stable "INCLUDE">/;\
792 s/<!entity +% +p-not-stable.*>/<!entity % p-not-stable "IGNORE">/' \
793 doc/source/*sgml doc/source/*/*sgml
794 $(RM) -r doc/source/*bak doc/source/*/*bak
796 @$(ECHO) Setting docs to not stable $(VERSION)
797 @$(PERL) -pi.bak -e 's/<!entity +% +p-stable.*>/<!entity % p-stable "IGNORE">/;\
798 s/<!entity +% +p-not-stable.*>/<!entity % p-not-stable "INCLUDE">/' \
799 doc/source/*sgml doc/source/*/*sgml
800 $(RM) -r doc/source/*bak doc/source/*/*bak
803 # Generate single page html. Used only for creating pdf docs (ATM).
804 # Currently using: See http://www.easysw.com/htmldoc/pdf-o-matic.php.
805 # If using this generator, remember U-M has a couple of graphics in
806 # a parallel directory.
808 dok-shtml: dok-release
809 mkdir -p doc/source/temp # this directory not in cvs
810 cd doc/source && $(DB) -iuser-man -V nochunks user-manual.sgml > temp/privoxy-user-manual.html
811 cd doc/source && $(DB) -V nochunks developer-manual.sgml > temp/privoxy-developer-manual.html
812 cd doc/source && $(DB) -V nochunks faq.sgml > temp/privoxy-faq.html
813 # one could use html2ps and ps2pdf. well, that does not work. htmlps produces incorrect output.
815 # Make pdf docs from single page html. Requires htmldoc, see
816 # (http://www.easysw.com/htmldoc/). Note: 1.8.20 has a TOC bug.
817 # PDF docs are uploaded to webserver as zip archive.
819 @$(ECHO) -n "starting htmldoc version: "; htmldoc --version
820 cd utils/ldp_print && $(RM) *html *bak *jpg *tmp *pdf *zip
821 cp -f doc/source/temp/*html doc/webserver/images/*jpg utils/ldp_print
822 cd utils/ldp_print ;\
823 $(PERL) -pi.bak -e 's/\.\.\/images\///; s/(<\/?)SUB/$$1small/i;\
824 s/\.\.\/user-manual\/index\.html/privoxy-user-manual.pdf/;\
825 s/\.\.\/developer-manual\/index\.html/privoxy-developer-manual.pdf/;\
826 s/\.\.\/faq\/index\.html/privoxy-faq.pdf/' *.html ;\
827 for i in developer-manual user-manual faq; do \
828 ./ldp_print privoxy-$$i.html ;\
829 $(ECHO) DONE: privoxy-$$i.pdf ;\
831 $(MV) *.pdf ../../doc/pdf ;\
832 $(RM) -r *html *bak *jpg *pdf *zip ../../doc/source/temp
834 # Create release announcement in text and html, with short and long versions.
835 # This is a standalone target, and must be invoked directly.
836 announce: dok-release
838 cd $(DOC_TMP) && cp -f ../announce.sgml . && $(DB) -iannounce-big announce.sgml &&\
839 mv -f index.html announce.html && $(WDUMP) announce.html > announce.txt
840 cd $(DOC_TMP) && $(DB) announce.sgml &&\
841 mv -f index.html announce-mini.html && $(WDUMP) announce-mini.html > announce-mini.txt &&\
842 mv -f *html *txt ../../..
845 # The main Privoxy config file, generated from sgml sources.
846 # NOTE: This will require some hand editing. The new file is outputted
847 # as config.new so that problem sections can be compared to previous
848 # version. This is hardcored to w3m for html/text conversion. Also,
849 # requires the shell util 'fmt'.
850 config-file: dok-release
851 cd doc/source && $(DB)-notoc -iconfig-file -V nochunks config.sgml > __tmp.html &&\
852 w3m -dump __tmp.html |fmt -w 70 > ../../config.new && $(RM) -r __tmp.*
853 $(PERL) -pi.bak -e 's/^1\. \@\@TITLE\@\@/ /i;\
854 /^\d\.\d\.\s+/ && tr/[a-z]/[A-Z]/;\
855 $$header_len=0 unless $$hit_header;\
858 for ($$i=1; $$i < $$header_len; $$i++) {print "=";}\
862 $$hit_header=1 if m/^(\d\.)(\d\.)(\d\.)?\s/ && s/^(\d\.)//;\
863 $$header_len = length($$_);\
864 s/^/# /; /^# #{12,}/ && s/^# #/####/;\
865 s/^.*$$// if $$hit_option;\
867 s/^\n//; s/^#\s*-{20,}//;\
868 $$hit_option=1 if s/^#\s+@@//;' config.new
870 @$(ECHO) "****************************************************"
871 @$(ECHO) "The output file is config.new."
872 @$(ECHO) "Now -- you need to hand edit the results!!!"
873 @$(ECHO) "In particular, check the Debug levels, the"
874 @$(ECHO) "permit-access, forward & socks examples and the"
875 @$(ECHO) "various user-manual examples, which all"
876 @$(ECHO) "probably got hammered."
877 @$(ECHO) "****************************************************"
879 # config file, alternate verison using lynx (perl stuff unfinished). Lynx
880 # does not do so good a job.
882 cd doc/source && $(ECHO) -e ".h2 JUSTIFY\\nJUSTIFY:FALSE" > __tmp.lynx_cfg &&\
883 $(DB)-notoc -iconfig-file -V nochunks config.sgml > __tmp.html &&\
884 lynx -cfg=__tmp.lynx_cfg -width=78 -dump __tmp.html > ../../config.new && $(RM) -r __tmp.*
885 $(PERL) -pi -e 's/^( )//;\
886 s/:$\/:\n/' config.new
888 #############################################################################
892 # moves dokumentation to webserver
894 #############################################################################
896 @$(ECHO) -------------------------------------------------------
897 @$(ECHO) You have run make dok/redhat-dok before, right?
898 @$(ECHO) Note that this command scps all stuff to the webserver,
899 @$(ECHO) it will not remove obsolete documents.
900 @$(ECHO) -------------------------------------------------------
902 @$(ECHO) Uploading html
904 upload=`find . -type f -a -not \( -path "*/CVS*" -o -path "*/results*" \)`; \
905 $(TAR) c $$upload | ssh ijbswa.sourceforge.net 'cd /home/groups/i/ij/ijbswa/htdocs/; tar xvm 2>&1 | grep -v timestamp'
907 @$(ECHO) Uploading pdf
909 zip privoxy-pdf-docs *.pdf ;\
910 scp -q privoxy-pdf-docs.zip ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/pdf
912 @$(ECHO) Fixing permissions
913 @ssh ijbswa.sourceforge.net 'chmod -R 775 /home/groups/i/ij/ijbswa/htdocs 2>/dev/null; true'
914 @ssh ijbswa.sourceforge.net 'find /home/groups/i/ij/ijbswa/htdocs/ -type f | xargs chmod 664 2>/dev/null; true'
915 @ssh ijbswa.sourceforge.net 'chmod 666 /home/groups/i/ij/ijbswa/htdocs/actions/results/actions-feedback.txt 2>/dev/null; true'
920 @cd doc/webserver/actions; \
921 upload=`find . -type f -a -not \( -path "*/CVS*" -o -path "*/results*" \)`; \
922 $(TAR) c $$upload | ssh ijbswa.sourceforge.net 'cd /home/groups/i/ij/ijbswa/htdocs/actions; tar xvm'
924 @$(ECHO) Fixing permissions
925 @ssh ijbswa.sourceforge.net 'find /home/groups/i/ij/ijbswa/htdocs/actions/ -type f | xargs chmod 664 2>/dev/null'
926 @ssh ijbswa.sourceforge.net 'chmod 666 /home/groups/i/ij/ijbswa/htdocs/actions/results/actions-feedback.txt 2>/dev/null'
928 #############################################################################
929 # Source file dependencies
930 #############################################################################
932 actions.@OBJEXT@: actions.c actions.h config.h $(PROJECT_H_DEPS) errlog.h jcc.h list.h loaders.h miscutil.h actionlist.h
933 cgi.@OBJEXT@: cgi.c cgi.h config.h $(PROJECT_H_DEPS) cgiedit.h cgisimple.h list.h pcrs.h encode.h ssplit.h jcc.h filters.h actions.h errlog.h miscutil.h
934 cgiedit.@OBJEXT@: cgiedit.c cgiedit.h config.h $(PROJECT_H_DEPS) cgi.h list.h pcrs.h encode.h ssplit.h jcc.h filters.h actions.h errlog.h miscutil.h
935 cgisimple.@OBJEXT@: cgisimple.c cgisimple.h config.h $(PROJECT_H_DEPS) cgi.h list.h pcrs.h encode.h ssplit.h jcc.h filters.h actions.h errlog.h miscutil.h
936 deanimate.@OBJEXT@: deanimate.c deanimate.h config.h $(PROJECT_H_DEPS)
937 encode.@OBJEXT@: encode.c encode.h config.h
938 errlog.@OBJEXT@: errlog.c errlog.h config.h $(PROJECT_H_DEPS) @WIN_ONLY@w32log.h
939 filters.@OBJEXT@: filters.c filters.h config.h $(PROJECT_H_DEPS) errlog.h encode.h gateway.h jbsockets.h jcc.h loadcfg.h parsers.h ssplit.h cgi.h deanimate.h @WIN_ONLY@win32.h
940 gateway.@OBJEXT@: gateway.c gateway.h config.h $(PROJECT_H_DEPS) errlog.h jbsockets.h jcc.h loadcfg.h
941 jbsockets.@OBJEXT@: jbsockets.c jbsockets.h config.h $(PROJECT_H_DEPS) filters.h
942 jcc.@OBJEXT@: jcc.c jcc.h config.h $(PROJECT_H_DEPS) errlog.h filters.h gateway.h jbsockets.h killpopup.h loadcfg.h loaders.h miscutil.h parsers.h @WIN_ONLY@w32log.h win32.h cgi.h
943 killpopup.@OBJEXT@: killpopup.c killpopup.h config.h $(PROJECT_H_DEPS) jcc.h loadcfg.h
944 list.@OBJEXT@: list.c list.h config.h $(PROJECT_H_DEPS) list.h miscutil.h
945 loadcfg.@OBJEXT@: loadcfg.c loadcfg.h config.h $(PROJECT_H_DEPS) errlog.h filters.h gateway.h jbsockets.h jcc.h killpopup.h loaders.h miscutil.h parsers.h @WIN_ONLY@w32log.h win32.h
946 loaders.@OBJEXT@: loaders.c loaders.h config.h $(PROJECT_H_DEPS) errlog.h encode.h filters.h gateway.h jcc.h loadcfg.h miscutil.h parsers.h ssplit.h
947 miscutil.@OBJEXT@: miscutil.c miscutil.h config.h
948 parsers.@OBJEXT@: parsers.c parsers.h config.h $(PROJECT_H_DEPS) errlog.h encode.h filters.h jbsockets.h jcc.h loadcfg.h loaders.h miscutil.h ssplit.h
949 ssplit.@OBJEXT@: ssplit.c ssplit.h config.h miscutil.h
950 urlmatch.@OBJEXT@: urlmatch.c urlmatch.h config.h $(PROJECT_H_DEPS) errlog.h miscutil.h ssplit.h
953 gnu_regex.@OBJEXT@: gnu_regex.c gnu_regex.h config.h
956 pcrs.@OBJEXT@: pcrs.c pcrs.h config.h pcre/pcre.h
959 pcre/get.@OBJEXT@: pcre/get.c pcre/config.h pcre/internal.h pcre/pcre.h
960 pcre/maketables.@OBJEXT@: pcre/maketables.c pcre/config.h pcre/internal.h pcre/pcre.h
961 pcre/pcre.@OBJEXT@: pcre/pcre.c pcre/config.h pcre/internal.h pcre/pcre.h pcre/chartables.c
962 pcre/pcreposix.@OBJEXT@: pcre/pcreposix.c pcre/config.h pcre/internal.h pcre/pcre.h pcre/pcreposix.h
963 pcre/study.@OBJEXT@: pcre/study.c pcre/config.h pcre/internal.h pcre/pcre.h
965 # An auxiliary program makes the PCRE default character table source
967 pcre/chartables.c: pcre/dftables@EXEEXT@
968 pcre/dftables@EXEEXT@ >pcre/chartables.c
970 pcre/dftables@EXEEXT@: pcre/dftables.c pcre/maketables.c pcre/pcre.h pcre/internal.h pcre/config.h
971 $(CC) -o pcre/dftables@EXEEXT@ $(CFLAGS) pcre/dftables.c
974 w32log.@OBJEXT@: w32log.c errlog.h config.h jcc.h loadcfg.h miscutil.h pcre/pcre.h pcre/pcreposix.h pcrs.h project.h w32log.h w32taskbar.h win32.h
975 w32taskbar.@OBJEXT@: w32taskbar.c config.h w32log.h w32taskbar.h
976 win32.@OBJEXT@: win32.c config.h jcc.h loadcfg.h pcre/pcre.h pcre/pcreposix.h pcrs.h project.h w32log.h win32.h
978 w32.res: w32.rc w32res.h icons/ico00001.ico icons/ico00002.ico icons/ico00003.ico icons/ico00004.ico icons/ico00005.ico icons/ico00006.ico icons/ico00007.ico icons/ico00008.ico icons/idle.ico icons/privoxy.ico config.h
979 windres -D__MINGW32__=0.2 -O coff -i $< -o $@
982 @AMIGAOS_ONLY@OBJS += amiga.o
983 @AMIGAOS_ONLY@CFLAGS += -D__AMIGAVERSION__=\"$(VERSION_MAJOR).$(VERSION_MINOR)$(VERSION_POINT)\" -D__AMIGADATE__=\"`date +%d.%m.%Y`\" -W -m68020 -noixemul -fbaserel -msmall-code
984 @AMIGAOS_ONLY@LDFLAGS += -m68020 -noixemul -fbaserel
985 @AMIGAOS_ONLY@LIBS = -lm /gg/lib/libb/libm020/libnix/swapstack.o
986 @AMIGAOS_ONLY@amiga.o: amiga.c amiga.h config.h
989 $(PROGRAM): $(OBJS) $(W32_FILES)
990 $(LD) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
993 $(RM) a.out $(OBJS) $(W32_FILES) $(W32_INIS) $(PROGRAM) default.action `find . -name TAGS -o -name tags`
996 $(RM) `find . -name "*~"`
997 # $(RM) `find . -name "#*#"` # what is this for??
998 $(RM) `find . -name ".\#*"`
1001 $(RM) GNUmakefile configure config.h.in config.h config.cache config.status config.log logfile \
1002 privoxy.log core *.tar.gz *.tar privoxy-cl.spec doc/source/ldp.dsl
1005 # FIXME: What is all this?
1007 $(RM) cscope.* *.pdb *.lib *.exp
1011 tags: $(SRCS) $(HDRS)
1012 etags $(SRCS) $(HDRS)
1014 CONF_DEST:=$(shell if [ "$(prefix)" = "/usr/local" ] && [ "$(CONF_BASE)" = "$(prefix)/etc" ];then \
1015 $(ECHO) "$(CONF_BASE)/privoxy";\
1017 $(ECHO) "$(CONF_BASE)";\
1020 LOG_DEST:=$(shell if [ "$(prefix)" = "/usr/local" ] && [ "$(LOGS_DEST)" = "$(prefix)/var/log/privoxy" ];then \
1021 $(ECHO) "/var/log/privoxy" ;\
1023 $(ECHO) "$(LOGS_DEST)";\
1026 PID_DEST:=$(shell if [ "$(prefix)" = "/usr/local" ] && [ "$(PIDS_DEST)" = "$(prefix)/var/run" ];then \
1027 $(ECHO) "/var/run" ;\
1029 $(ECHO) "$(PIDS_DEST)";\
1032 check_doc:=$(shell if [ ! -d "$(SHARE_DEST)/doc" ] && [ "$(prefix)" = "/usr/local" ] && [ -d "$(prefix)/doc" ];then \
1038 # If USER is specified but no GROUP, assume there is a GROUP of same name.
1039 GROUP_T:=$(shell if [ x$(GROUP) = x ] && [ x$(USER) != x ];then \
1040 $(ECHO) "$(USER)" ;\
1042 $(ECHO) "$(GROUP)";\
1046 $(MAKE) install STRIP=-s
1048 # FIXME: Test USER and GROUP on Slack to make sure this works as
1051 # FIXME: id handling needs help, probably via configure, since 'id -u' is not
1052 # universally reliable (eg Solaris). Group handling could be better.
1053 # Perhaps the whole user/group validation should be done here, and simplified.
1054 PROGRAM_V = Privoxy $(VERSION)
1055 install: CONF_DEST LOG_DEST PID_DEST check_doc GROUP_T
1056 @# Quick test for valid USER.
1057 @if [ -n "$(USER)" ]; then \
1058 $(ID) $(USER) >/dev/null || exit 1;\
1060 @# Test for valid group. FIXME. USER does not have to belong to GROUP
1061 @# for file ownership purposes.
1062 # if [ -n "$(GROUP_T)" ] && [ -n "$(USER)" ] && ! $(GROUPS) $(USER) | $(GREP) "\<$(GROUP_T)\>" >/dev/null; then \
1063 # $(ECHO) Group $(GROUP_T) for User $(USER) is invalid && exit 1 ;\
1066 @$(ECHO) "Creating directories, and preparing $(PROGRAM_V) installation"
1067 $(CHMOD) $(DIR_MODE) $(MKDIR)
1068 @$(MKDIR) $(SBIN_DEST) $(prefix) $(CONF_DEST) $(CONF_DEST)/templates $(SHARE_DEST) \
1069 $(LOG_DEST) $(PID_DEST)
1070 @# Install the executable binary, strip if invoked as install-strip
1071 @test -n "$(STRIP)" &&\
1072 $(ECHO) Installing $(PROGRAM) stripped executable to $(SBIN_DEST) ||\
1073 $(ECHO) Installing $(PROGRAM) executable to $(SBIN_DEST)
1074 $(INSTALL) $(INSTALL_P) $(STRIP) $(PROGRAM) $(SBIN_DEST)
1076 @# Install the DOCS and man page. install-sh only does one file at a time.
1077 -@if [ $(check_doc) = 0 ]; then \
1080 DOC=$(prefix)/doc/privoxy ;\
1082 $(MKDIR) $$DOC $$DOC/user-manual $$DOC/faq $$DOC/developer-manual \
1083 $$DOC/man-page $$DOC/images $(MAN_DEST) ;\
1084 if [ -d "$(DOK_WEB)" ]; then \
1085 $(ECHO) Installing FAQ, Manual, and other docs to $$DOC;\
1086 for i in user-manual developer-manual faq; do \
1087 for ii in $(DOK_WEB)/$$i/*html; do \
1088 $(INSTALL) $(INSTALL_T) $$ii $$DOC/$$i;\
1091 for i in $(DOK_WEB)/images/*jpg; do \
1092 $(INSTALL) $(INSTALL_T) $$i $$DOC/images;\
1094 $(INSTALL) $(INSTALL_T) $(DOK_WEB)/man-page/*html $$DOC/man-page;\
1095 $(INSTALL) $(INSTALL_T) $(DOK_WEB)/privoxy-index.html $$DOC/index.html;\
1096 $(INSTALL) $(INSTALL_T) AUTHORS $$DOC;\
1097 $(INSTALL) $(INSTALL_T) LICENSE $$DOC;\
1098 $(INSTALL) $(INSTALL_T) README $$DOC;\
1099 $(INSTALL) $(INSTALL_T) ChangeLog $$DOC;\
1100 $(INSTALL) $(INSTALL_T) $(DOK_WEB)/p_doc.css $$DOC;\
1102 @# Not all platforms support gzipped man pages.
1103 @$(ECHO) Installing man page to $(MAN_DEST)/privoxy.1
1104 -$(INSTALL) $(INSTALL_T) privoxy.1 $(MAN_DEST)/privoxy.1
1106 @# Change the config file default directories according to the configured ones
1107 @$(ECHO) Rewriting config for this installation
1108 @if [ -f config.base ] ; then \
1109 $(CAT) config >config~ ;\
1110 $(MV) config.base config ;\
1112 $(SED) 's+confdir .+confdir $(CONF_DEST)+' config | \
1113 $(SED) 's+logdir .+logdir $(LOG_DEST)+' >config.updated
1114 $(MV) config config.base
1115 $(MV) config.updated config
1117 @# Install the config support files. Test for root install, and abort
1118 @# if there is no privoxy user, and no other user was enabled during
1119 @# configure. Later, install init script if appropriate.
1120 @$(ECHO) Installing templates to $(CONF_DEST)/templates
1121 @for i in `find templates -type f`; do \
1122 $(INSTALL) $(INSTALL_T) $$i $(CONF_DEST)/templates ;\
1125 @# FIXME: group/user validation is overly convoluted.
1126 @# If superuser install ... we require a minimum of group ownership
1127 @# of those files the daemon writes to, to be non-root owned.
1128 @if [ "`$(ID) |sed 's/(.*//' |sed 's/.*=//'`" = "0" ] ;then\
1129 if [ x$(USER) = x ] || [ $(USER) = root ]; then \
1130 if [ x$(GROUP) = x ] || [ $(GROUP) = root ]; then \
1131 if [ "`$(ID) privoxy`" ] && \
1132 $(GROUPS) privoxy | $(SED) 's/^.*://' |$(GREP) "\<privoxy\>" >/dev/null; then \
1133 $(ECHO) "Warning: Setting group owner to privoxy";\
1136 $(ECHO) "******************************************************************" ;\
1137 $(ECHO) " WARNING! WARNING! installing config files as root!" ;\
1138 $(ECHO) " It is strongly recommended to run $(PROGRAM) as a non-root user," ;\
1139 $(ECHO) " and to install the config files as that user and/or group!" ;\
1140 $(ECHO) " Please read INSTALL, and create a privoxy user and group!" ;\
1141 $(ECHO) "*******************************************************************" ;\
1147 INSTALL_CONF="$(INSTALL_R) -g $$GROUP_T " ;\
1149 $(ECHO) "Superuser install, installing config files as $(USER):$(GROUP_T)" ;\
1150 INSTALL_CONF="$(INSTALL_R) -o $(USER) -g $(GROUP_T)" ;\
1151 GROUP_T=$(GROUP_T) ;\
1154 if [ ! "`id $(USER)`" = "`id`" ] ;then \
1155 $(ECHO) "** WARNING ** current install user different from configured user!!" ;\
1156 $(ECHO) "Edit may fail." ;\
1158 INSTALL_CONF="$(INSTALL_R)" ;\
1160 $(ECHO) Installing configuration files to $(CONF_DEST);\
1161 for i in $(CONFIGS); do \
1162 if [ -s "$(CONF_DEST)/$$i" ] ; then \
1163 $(ECHO) Installing $$i as $$i.new ;\
1164 $(INSTALL) $$INSTALL_CONF $$i $(CONF_DEST)/$$i.new || exit 1;\
1167 $(INSTALL) $$INSTALL_CONF $$i $(CONF_DEST) || exit 1;\
1170 if [ -n "$$NEW" ]; then \
1171 $(CHMOD) $(RWD_MODE) $(CONF_DEST)/*.new || exit 1 ;\
1172 $(ECHO) "Warning: Older config files are preserved. Check new versions for changes!" ;\
1174 [ ! -f $(LOG_DEST)/logfile ] && $(ECHO) Creating logfiles in $(LOG_DEST) || \
1175 $(ECHO) Checking logfiles in $(LOG_DEST) ;\
1176 $(TOUCH) $(LOG_DEST)/logfile $(LOG_DEST)/jarfile || exit 1 ;\
1177 if [ x$$USER != x ]; then \
1178 $(CHOWN) $$USER $(LOG_DEST)/logfile $(LOG_DEST)/jarfile || \
1179 $(ECHO) "** WARNING ** current install user different from configured user. Logging may fail!!" ;\
1181 if [ x$$GROUP_T != x ]; then \
1182 $(CHGRP) $$GROUP_T $(LOG_DEST)/logfile $(LOG_DEST)/jarfile || \
1183 $(ECHO) "** WARNING ** current install user different from configured user. Logging may fail!!" ;\
1185 $(CHMOD) $(RWD_MODE) $(LOG_DEST)/logfile $(LOG_DEST)/jarfile || exit 1 ;\
1186 if [ "$(prefix)" = "/usr/local" ] || [ "$(prefix)" = "/usr" ]; then \
1187 if [ -f /etc/slackware-version ] && [ -d /etc/rc.d/ ] && [ -w /etc/rc.d/ ] ; then \
1188 $(SED) 's+%PROGRAM%+$(PROGRAM)+' slackware/rc.privoxy.orig | \
1189 $(SED) 's+%SBIN_DEST%+$(SBIN_DEST)+' | \
1190 $(SED) 's+%CONF_DEST%+$(CONF_DEST)+' | \
1191 $(SED) 's+%USER%+$$USER+' | \
1192 $(SED) 's+%GROUP%+$(GROUP_T)+' >slackware/rc.privoxy ;\
1193 $(INSTALL) $(INSTALL_P) slackware/rc.privoxy /etc/rc.d/ ;\
1194 $(ECHO) "Installing for Slackware." ;\
1195 $(ECHO) "Dont forget to add the rc.privoxy to rc.local if you want it started at every boot" ;\
1196 elif [ -f /etc/redhat-release ] && [ -d /etc/rc.d/init.d/ ] && [ -w /etc/rc.d/init.d/ ] ; then \
1197 $(ECHO) "Installing init script to /etc/rc.d/init.d/privoxy" ;\
1198 $(SED) 's,^PRIVOXY_BIN=.*,PRIVOXY_BIN="/usr/local/sbin/$(PROGRAM)",' privoxy.init |\
1199 $(SED) 's,^PRIVOXY_CONF=.*,PRIVOXY_CONF="$(CONF_DEST)/config",' |\
1200 $(SED) "s,^PRIVOXY_USER=.*,PRIVOXY_USER=$$USER," > init.tmp ;\
1201 $(INSTALL) $(INSTALL_P) init.tmp /etc/rc.d/init.d/privoxy && $(RM) init.tmp;\
1202 $(MKDIR) /etc/logrotate.d/ ;\
1203 $(ECHO) "Installing logrotate script to /etc/logrotate.d/" ;\
1204 $(INSTALL) -m 0644 privoxy.logrotate /etc/logrotate.d/privoxy ;\
1205 elif [ -d /etc/init.d ] && [ -w /etc/init.d ] ; then \
1206 $(ECHO) "Installing generic init script to /etc/init.d/privoxy" ;\
1207 $(ECHO) "Please check that the PATHs are correct, and edit if needed." ;\
1208 $(INSTALL) $(INSTALL_P) privoxy-generic.init /etc/init.d/privoxy ;\
1211 $(ECHO) "No init script installed, install it manually if needed" ;\
1214 @$(ECHO) "$(PROGRAM_V) installation succeeded!"
1215 @$(ECHO) "The Privoxy configuration files have been installed in $(CONF_DEST)"
1217 # rmdir is used as a precaution since it will not remove non-empty
1218 # directories. RH init script creates lock file and pid file.
1219 uninstall: CONF_DEST LOG_DEST PID_DEST check_doc
1220 @$(ECHO) Starting Privoxy uninstallation
1221 @# KILL privoxy if running
1222 -@if [ -f /etc/redhat-release ] && [ -x /etc/rc.d/init.d/privoxy ]; then \
1223 /etc/rc.d/init.d/privoxy stop >/dev/null 2>/dev/null ;\
1224 chkconfig --del $(PROGRAM) 2>/dev/null;\
1226 -@test -f $(PID_DEST)/privoxy.pid && $(ECHO) Stopping $(PROGRAM) &&\
1227 $(KILL) `$(CAT) $(PID_DEST)/privoxy.pid` || :
1228 -@test -f /var/run/privoxy.pid && $(ECHO) Stopping $(PROGRAM) &&\
1229 $(KILL) `$(CAT) /var/run/privoxy.pid ` || :
1232 @$(ECHO) Removing $(PROGRAM) binary
1233 $(RM) $(SBIN_DEST)/$(PROGRAM) $(SBIN_DEST)/$(PROGRAM)~
1235 @# config files and dir, and maybe old install backups
1236 -@if [ -d $(CONF_DEST) ]; then \
1237 $(ECHO) Saving $(PROGRAM) config files to /tmp/$(PROGRAM)-save ;\
1238 $(MKDIR) /tmp/$(PROGRAM)-save ;\
1240 for i in $(CONFIGS); do \
1241 [ -f $$i ] && $(CP) $$i /tmp/$(PROGRAM)-save ;\
1244 @$(ECHO) Removing $(PROGRAM) config files
1245 -@for i in $(CONFIGS); do \
1246 test -f $(CONF_DEST)/$$i && $(ECHO) Removing $$i ;\
1247 $(RM) $(CONF_DEST)/$$i $(CONF_DEST)/$$i~ $(CONF_DEST)/$$i.new ;\
1249 -@test -d $(CONF_DEST)/templates && $(RM) -r $(CONF_DEST)/templates &&\
1250 $(ECHO) "Removing $(CONF_DEST)/templates/*"
1252 @# man page and docs
1253 @$(ECHO) Removing $(PROGRAM) docs
1254 -$(RM) $(MAN_DEST)/privoxy.1*
1255 -$(RM) -r $(DOC_DEST) || $(RM) -r $(prefix)/doc/privoxy
1257 @# Log and jarfile and pidfile
1258 @$(ECHO) Removing $(PROGRAM) logs
1259 -$(RM) $(LOG_DEST)/logfile $(PID_DEST)/privoxy.pid $(LOG_DEST)/jarfile
1261 @# Final clean up of unused directories. Special handling of CONF and LOG
1263 @$(ECHO) Removing $(PROGRAM) directories
1264 @for i in $(LOG_DEST) $(CONF_DEST); do \
1265 if test -d $$i; then \
1266 $(ECHO) Removing $$i ;\
1267 $(RMDIR) $$i || $(ECHO) "$$i is not empty, not removed" ;\
1270 @if [ ! "$(prefix)" = "/usr/local" ] ;then \
1271 for i in $(MAN_DEST) $(MAN_DIR) $(SHARE_DEST)/doc $(SHARE_DEST) $(SBIN_DEST); do \
1272 if test -d $$i; then \
1273 $(ECHO) Removing $$i ;\
1274 $(RMDIR) $$i || $(ECHO) "$$i is not empty, not removed" ;\
1277 if test $(LOG_DEST) != /var/log/privoxy && test -d $(prefix)/var/log; then \
1278 $(ECHO) Removing $(prefix)/var/log ;\
1279 $(RMDIR) $(prefix)/var/log || $(ECHO) "$(prefix)/var/log is not empty, not removed";\
1281 if test $(PID_DEST) != /var/run && test -d $(prefix)/var/run; then \
1282 $(ECHO) Removing $(prefix)/var/run ;\
1283 $(RMDIR) $(prefix)/var/run || $(ECHO) "$(prefix)/var/run is not empty, not removed";\
1285 if test $(prefix)/var != /var && test -d $(prefix)/var; then \
1286 $(ECHO) Removing $(prefix)/var ;\
1287 $(RMDIR) $(prefix)/var || $(ECHO) "$(prefix)/var is not empty, not removed" ;\
1289 if test $(prefix) != / && test $(prefix) != /usr && test -d $(prefix); then \
1290 $(ECHO) Removing $(prefix) ;\
1291 $(ECHO) Removing installation directory $(prefix) ;\
1292 $(RMDIR) $(prefix) || $(ECHO) "$(prefix) is not empty, not removed" ;\
1296 @# init scripts and logrotate
1297 @if [ "$(prefix)" = "/usr/local" ] || [ "$(prefix)" = "/usr" ]; then \
1298 $(ECHO) Removing $(PROGRAM) init script ;\
1299 if [ -f /etc/slackware-version ] && [ -d /etc/rc.d/ ] && [ -w /etc/rc.d/ ] ; then \
1300 $(RM) /etc/rc.d/rc.privoxy ;\
1301 elif [ -f /etc/redhat-release ] && [ -d /etc/rc.d/init.d/ ] && [ -w /etc/rc.d/init.d/ ] ; then \
1302 $(RM) /etc/rc.d/init.d/privoxy /etc/logrotate.d/privoxy;\
1303 elif [ -d /etc/init.d ] && [ -w /etc/init.d ] ; then \
1304 $(RM) /etc/init.d/privoxy ;\
1306 $(ECHO) "Unable to remove privoxy init script, not installed or permission denied" ;\
1309 @$(ECHO) Privoxy uninstalled, bye
1312 @perl -e 'print pack "C*", (31,139,8,8,153,63,226,60,2,3,99,111,102,102,101,101,0,109,143,205,13,192,32,8,133,\
1313 239,78,241,110,234,1,28,160,171,152,208,53,26,117,247,22,165,73,137,125,9,1,62,126,2,128,169,5,243,143,\
1314 13,139,49,164,65,100,149,152,102,73,141,88,73,178,116,205,100,69,253,36,102,81,49,83,236,19,225,171,131,\
1315 214,172,163,73,4,168,123,115,71,126,247,122,94,128,178,227,95,154,12,86,215,122,197,249,146,187,54,220,125,\
1316 193,51,228,11,1,0,0);'|zcat
1318 #############################################################################
1324 # $Log: GNUmakefile.in,v $
1325 # Revision 1.104.2.20 2002/10/25 02:44:22 hal9
1326 # Port of make install, etc from main trunk. Needs testing! Add Slackware
1327 # support, and other related changes. Update related docs.
1329 # Revision 1.104.2.19 2002/09/26 22:50:02 hal9
1330 # New user-manual examples in config-file are getting wrapped. Add warning.
1332 # Revision 1.104.2.18 2002/08/23 12:22:40 oes
1333 # Added warning to broken install target
1335 # Revision 1.104.2.17 2002/08/16 03:19:34 hal9
1336 # More (minor) cleanup of html before pdf processing to make some relative
1337 # links work as pdf -> pdf. Upload pdf as zip archive now.
1339 # Revision 1.104.2.16 2002/08/14 16:43:27 hal9
1340 # Added pdf docs to make webserver target.
1342 # Revision 1.104.2.15 2002/08/11 20:02:41 hal9
1343 # New targets for man page (make man) and pdf (make dok-pdf) targets.
1345 # Revision 1.104.2.14 2002/08/10 11:19:37 oes
1346 # - Make -Ipcre (again) conditional on STATIC_PCRE
1347 # - $(RPMBUILD) -> $(RPM) for SuSE
1348 # - Add dependency: pcrs.o deps on config.h
1350 # Revision 1.104.2.13 2002/08/07 15:13:54 hal9
1351 # Remove pdf2 target, and make it dok-shtml (single page html for pdf
1354 # Revision 1.104.2.12 2002/08/06 11:29:36 oes
1355 # Fixed detection/inclusion of pcre.h, which is in a pcre subdir on RH
1357 # Revision 1.104.2.11 2002/07/30 19:38:11 hal9
1358 # Add redhat-test target for testing purposes only. Fix RPM_PACKAGEV to what
1359 # *I think* it was supposed to be (was breaking upload targets since it was
1360 # set to RPM_VERSION).
1362 # Revision 1.104.2.10 2002/07/27 22:56:53 kick_
1363 # cleanups of the redhat-srpm target
1365 # Revision 1.104.2.9 2002/07/26 15:17:02 oes
1366 # - Added generation of default.action from defaul.action.master
1367 # - Deleted obsolete re_filterfile.txt generation
1369 # Revision 1.104.2.8 2002/07/12 10:04:32 kick_
1370 # added helper targets to the makefile. They shouldn't break anything, but
1371 # make my life a lot easier.
1373 # The new rpm has been splitted into two parts, one for package installation/
1374 # removal, one for package building.
1375 # Therefore rpm -ta isn't a valid command anymore and needs to be replaced
1376 # by rpmbuild -ta (this is backwards compatible)
1378 # Revision 1.104.2.7 2002/06/07 00:23:47 hal9
1379 # Fixing a quirk of man2html (on my system) that pulls punctuation into URLs,
1380 # thus breaking them completely.
1382 # Revision 1.104.2.6 2002/06/02 03:26:25 hal9
1383 # Update CONFIG_FILES (ie update basic.action, etc), and also DOC_FILES (exclude
1384 # index.html and team/index.html)
1386 # Revision 1.104.2.5 2002/05/30 15:35:01 hal9
1387 # This is more cleanup on the make config-file target. Most issues for
1388 # automatic generation are taken care of. There are still some problems
1389 # that require hand editing. Namely, some of the examples that are > 80 chars.
1391 # Revision 1.104.2.4 2002/05/29 02:12:17 hal9
1392 # Ooops...forgot about perl -pi cygwin problem. Add -pi.bak. Also, the
1393 # new target is 'make config-file', _not_ make config.
1395 # Revision 1.104.2.3 2002/05/29 02:05:48 hal9
1396 # 'make config' target added (WIP) for future generation of config file from
1397 # text in u-m so the two are in sync. New generated config, which requires
1398 # some hand editing for the time being.
1400 # Revision 1.104.2.2 2002/05/28 02:32:55 hal9
1401 # New target 'make dok-index' for privoxy-index.html. Also, fixed *.bak files
1402 # not being cleaned up in doc/webserver.
1404 # Revision 1.104.2.1 2002/05/26 17:19:34 hal9
1405 # Remove Table of Contents from readme with oes's dsl trick.
1407 # Revision 1.104 2002/05/24 00:03:49 oes
1408 # Use p_doc.css for the Homepage for consistency
1410 # Revision 1.103 2002/05/23 23:19:00 oes
1411 # Use dsl without TOC for the homepage
1413 # Revision 1.102 2002/05/16 01:20:17 hal9
1414 # make announce target added.
1416 # Revision 1.101 2002/05/15 12:28:46 oes
1417 # Trying to keep Hal happy :)
1419 # Revision 1.100 2002/05/08 13:48:18 hal9
1420 # Ooops, that trashed JB v2.0.2 comment. Fixed.
1422 # Revision 1.99 2002/05/08 13:42:07 hal9
1423 # This fixes the numbering problem on index.html in contact info section (.1.). Using
1424 # perl, since its way too convoluted to try to fix proper with docbook.
1426 # Revision 1.98 2002/05/03 14:33:06 oes
1427 # Replaced ldp(OK).dsl handling with generation via autoconf; handle all file exeptions to src tarball via find
1429 # Revision 1.97 2002/04/27 20:27:43 swa
1430 # no longer needed due to new
1431 # PACKAGE_VERSION process
1433 # Revision 1.96 2002/04/27 17:44:32 morcego
1434 # - Correcting typo in my name (Rodrigo, not Rodgrigo) :-)
1435 # - Using the RM macro everywhere rm is called (either we use, or don't)
1438 # Revision 1.95 2002/04/27 15:37:25 swa
1439 # replacing directory in document creation process
1440 # no longer necessary.
1442 # Revision 1.94 2002/04/27 08:23:29 swa
1443 # pdf process reviewed and cleaned up
1445 # Revision 1.93 2002/04/27 04:55:53 morcego
1446 # privoxy-cl.spec now gets removed by clobber target
1448 # Revision 1.92 2002/04/27 04:53:40 morcego
1449 # Adding --exclude "PACKAGERS" to every tar command that applies (not for
1452 # Revision 1.91 2002/04/27 04:44:51 morcego
1453 # GNUmakefile.in: The tarball created on redhat-dist and suse-dist now ignore
1454 # the PACKAGERS file, as well privoxy-cl.spec (in case it was created)
1455 # GNUmakefile.in: New targets -> conectiva-spec, conectiva-dist and
1457 # genclspec.sh : New file to generate, from privoxy-rh.spec, a specfile
1458 # for Conectiva Linux
1460 # Revision 1.90 2002/04/26 17:46:53 swa
1463 # Revision 1.89 2002/04/26 17:20:54 swa
1464 # just produce single html files to proces them later with Destiller or somesuch. looks prettier.
1466 # Revision 1.88 2002/04/25 19:13:57 morcego
1467 # Removed RPM release number declaration on configure.in
1468 # Changed makefile to use given value for RPM_PACKAGEV when on uploading
1469 # targets (will produce an error, explaining who to do it, if no value
1472 # Revision 1.87 2002/04/23 14:10:59 swa
1473 # now create pdf documents
1475 # Revision 1.86 2002/04/15 04:30:27 hal9
1476 # Missed two -pi.bak's on perl/cygwin problem.
1478 # Revision 1.85 2002/04/14 01:05:34 hal9
1479 # Revert dok-webserver change for SF logo.
1481 # Revision 1.84 2002/04/13 22:43:25 hal9
1482 # -Fix dok-webserver for SF logo (more perl).
1483 # -Change all perl -pi to perl -pi.bak for Cygwin problem.
1485 # Revision 1.83 2002/04/12 09:39:25 oes
1486 # Excluding yet more files from tarball; making dist warning yet more scary
1488 # Revision 1.82 2002/04/11 21:07:11 oes
1489 # Excluding more files from tarball build
1491 # Revision 1.81 2002/04/11 14:40:27 oes
1492 # Fixed typo -- Thanks, Moritz!
1494 # Revision 1.80 2002/04/11 12:50:00 oes
1495 # Fixed tarball-dist target
1497 # Revision 1.79 2002/04/11 06:49:28 oes
1498 # webserver target: silenced timestamp warnings resulting from uploading westwards, made permissions fixing independant of screwed local dir permissions, suppress (false alarm) make error if not owner of feedback log
1500 # Revision 1.78 2002/04/09 13:37:11 sarantis
1501 # fix tar options typo
1503 # Revision 1.77 2002/04/09 13:28:53 swa
1504 # build suse and gen-dist with html docs
1506 # Revision 1.76 2002/04/08 22:43:41 oes
1507 # Fix: Include dotfiles in fixing webserver permissions
1509 # Revision 1.75 2002/04/08 22:14:59 oes
1510 # Silencing tar warnings in the web* targets
1512 # Revision 1.74 2002/04/08 15:22:44 hal9
1513 # This has finishing touches for dok building. Should be ready to go.
1514 # -The main doc build is now 'make dok', should work on Redhat too.
1515 # -Removed man page from main doc build. It is built separately due to
1516 # perl scripts that most aren't likely to have.
1518 # Revision 1.73 2002/04/08 14:03:24 oes
1519 # oes for al: Fix install target
1521 # Revision 1.72 2002/04/08 13:42:11 oes
1522 # Added safety check to *-dist targets; fixed permissions for feedback logfile
1524 # Revision 1.71 2002/04/07 20:32:03 hal9
1525 # -Add meta data kludge for make dok-webserver via $(PERL).
1526 # -Add subdirs for 'make dok-release'.
1528 # Revision 1.70 2002/04/07 08:59:40 swa
1529 # generated files. do NOT edit.
1530 # fixed directory bug in makefile.
1532 # Revision 1.69 2002/04/07 08:10:47 swa
1533 # create some of the webserver docs
1534 # automatically (in particular if
1535 # those docs recycle other documentation
1536 # fragments). Now committed webserver's
1539 # Revision 1.68 2002/04/07 07:58:11 swa
1540 # create some of the webserver docs
1541 # automatically (in particular if
1542 # those docs recycle other documentation
1545 # Revision 1.67 2002/04/07 05:31:42 hal9
1546 # Add 'dok-release' target:
1547 # -Set doc entities to VERSION and CODE_STATUS during make.
1548 # -Set doc conditional content flags (stable vs non-stable).
1549 # A separate target for the time being but needs to be incorporated into
1550 # dok build at some point.
1551 # -Filter out a spurious ^G from new man page > html converion in man2html.
1553 # Revision 1.66 2002/04/06 20:28:21 jongfoster
1554 # Prettifying groff2html.
1555 # Using GNU Make's conditional makefile feature rather than shell "if"s.
1556 # (The shell "if"s were hiding errors)
1557 # "perl" -> "$(PERL)"
1558 # Spaces->tabs in a couple of places.
1560 # Revision 1.65 2002/04/06 05:16:39 hal9
1561 # -Add 'authors' and 'man' targets for AUTHORS and man-page (WIP).
1562 # -Both of these will soon be generated files.
1564 # Revision 1.64 2002/04/04 22:14:51 oes
1565 # No longer rely on find honoring -iname
1567 # Revision 1.63 2002/04/04 21:06:22 swa
1570 # Revision 1.62 2002/04/04 20:49:50 swa
1571 # attempt to consolidate the
1572 # different dokbook versions.
1574 # Revision 1.61 2002/04/04 19:18:21 swa
1575 # readme was leftover directory. use w3m instead
1576 # of lynx to be consistent among developers. use
1577 # consistent target naming.
1579 # Revision 1.60 2002/04/04 12:25:41 oes
1580 # Tidy webserver upload w/o *~ files, CVS dirs and logfiles and with proper dir and file permissions
1582 # Revision 1.59 2002/04/04 08:32:45 swa
1583 # wrong name for tarball-dist target. further fixed content of tarball dist
1585 # Revision 1.58 2002/04/04 06:32:58 hal9
1586 # New dok targets for make readme.
1588 # Revision 1.57 2002/04/04 00:36:36 gliptak
1589 # always use pcre for matching
1591 # Revision 1.56 2002/04/03 22:28:03 gliptak
1592 # Removed references to gnu_regex
1594 # Revision 1.55 2002/04/03 19:54:29 swa
1595 # freebsd tested to work. attempt to move tarball dist target forward
1597 # Revision 1.54 2002/04/03 14:54:07 oes
1598 # Standard clean and clobber semantics II
1600 # Revision 1.53 2002/04/03 14:19:16 oes
1601 # Standard clean and clobber semantics
1603 # Revision 1.52 2002/04/03 02:56:18 hal9
1604 # Revert previous FAQ numbering kludge.
1606 # Revision 1.51 2002/04/02 13:03:56 oes
1607 # Added fix for webserver permissions
1609 # Revision 1.50 2002/04/02 03:46:24 hal9
1610 # Rewrite ldpOK.dsl so that sections are NOT numbered on FAQ, in an effort
1611 # to make the Table of Contents not so 'busy' looking. SuSE needs testing :)
1613 # Revision 1.49 2002/03/30 22:20:12 swa
1614 # cd didn't work. neither did find.
1616 # Revision 1.48 2002/03/30 19:04:06 swa
1617 # people release differently. no good.
1618 # I want to make parts of the docs only.
1620 # Revision 1.47 2002/03/30 09:05:21 swa
1621 # better packaging. better rpm building.
1622 # tar failed on sun (no exclude there).
1624 # Revision 1.46 2002/03/29 20:09:01 swa
1627 # Revision 1.45 2002/03/29 19:45:45 swa
1630 # Revision 1.44 2002/03/29 17:42:44 gliptak
1631 # Correcting for Solaris tar limitations
1633 # Revision 1.43 2002/03/29 07:40:03 swa
1634 # fixed make webserver. doh
1636 # Revision 1.42 2002/03/29 06:59:04 swa
1637 # other users could not modify files on webserver
1639 # Revision 1.41 2002/03/28 20:43:00 swa
1640 # set make correctly
1642 # Revision 1.40 2002/03/28 04:22:44 hal9
1643 # More on man2html stuff.
1645 # Revision 1.39 2002/03/28 01:04:14 hal9
1646 # More man2html stuff for docs.
1648 # Revision 1.38 2002/03/27 16:02:30 swa
1649 # have a generic target
1651 # Revision 1.37 2002/03/27 15:30:26 swa
1652 # have a consistent appearance
1654 # Revision 1.36 2002/03/27 14:58:08 swa
1655 # can be used by mutilple targets
1657 # Revision 1.35 2002/03/27 14:53:19 swa
1658 # added solaris-dist
1660 # Revision 1.34 2002/03/27 10:30:11 swa
1661 # we want a html man file on the webserver
1663 # Revision 1.33 2002/03/27 03:05:35 hal9
1664 # Added man2html target for docs (redhat-dok only for now)
1666 # Revision 1.32 2002/03/26 22:29:54 swa
1667 # we have a new homepage!
1669 # Revision 1.31 2002/03/26 14:00:18 swa
1670 # fixed make tarball, tarball-dist, tarball-clean
1672 # Revision 1.30 2002/03/25 12:52:25 swa
1675 # Revision 1.29 2002/03/24 17:03:55 jongfoster
1678 # Revision 1.28 2002/03/24 16:19:48 swa
1679 # configure needs to be generated.
1681 # Revision 1.27 2002/03/24 16:13:57 swa
1682 # generated files are a nono in cvs
1684 # Revision 1.26 2002/03/24 15:36:02 swa
1687 # Revision 1.25 2002/03/24 14:31:08 swa
1688 # remove more crappy files. set RPM
1689 # release version correctly.
1691 # Revision 1.24 2002/03/24 14:19:55 swa
1692 # set rpm package release in configure.in. nowhere else.
1694 # Revision 1.23 2002/03/24 13:06:49 swa
1695 # suse-clean now runs fine
1697 # Revision 1.22 2002/03/24 12:56:21 swa
1698 # name change related issues.
1700 # Revision 1.21 2002/03/24 12:43:57 swa
1703 # Revision 1.20 2002/03/24 11:39:17 jongfoster
1704 # Renaming config files
1706 # Revision 1.19 2002/03/22 20:53:03 morcego
1707 # - Ongoing process to change name to JunkbusterNG
1708 # - configure/configure.in: no change needed
1710 # - TAR_ARCH = /tmp/JunkbusterNG-$(RPM_VERSION).tar.gz
1711 # - PROGRAM = jbng@EXEEXT@
1712 # - rh-spec now references as junkbusterng-rh.spec
1713 # - redhat-upload: references changed to junkbusterng-* (package names)
1714 # - tarball-dist: references changed to JunkbusterNG-distribution-*
1715 # - tarball-src: now JunkbusterNG-*
1716 # - install: initscript now junkbusterng.init and junkbusterng (when
1718 # - junkbuster-rh.spec: renamed to junkbusterng-rh.spec
1719 # - junkbusterng.spec:
1720 # - References to the expression ijb where changed where possible
1721 # - New package name: junkbusterng (all in lower case, acording to
1722 # the LSB recomendation)
1723 # - Version changed to: 2.9.13
1725 # - Added: junkbuster to obsoletes and conflicts (Not sure this is
1726 # right. If it obsoletes, why conflict ? Have to check it later)
1727 # - Summary changed: Stefan, please check and aprove it
1728 # - Changes description to use the new name
1729 # - Sed string was NOT changed. Have to wait to the manpage to
1731 # - Keeping the user junkbuster for now. It will require some aditional
1732 # changes on the script (scheduled for the next specfile release)
1733 # - Added post entry to move the old logfile to the new log directory
1734 # - Removing "chkconfig --add" entry (not good to have it automaticaly
1735 # added to the startup list).
1736 # - Added preun section to stop the service with the old name, as well
1737 # as remove it from the startup list
1738 # - Removed the chkconfig --del entry from the conditional block on
1739 # the preun scriptlet (now handled on the %files section)
1740 # - junkbuster.init: renamed to junkbusterng.init
1741 # - junkbusterng.init:
1742 # - Changed JB_BIN to jbng
1743 # - Created JB_OBIN with the old value of JB_BIN (junkbuster), to
1744 # be used where necessary (config dir)
1747 # - The config directory is /etc/junkbuster yet. Have to change it on the
1748 # specfile, after it is changes on the code
1749 # - The only files that got renamed on the cvs tree were the rh specfile and
1750 # the init file. Some file references got changes on the makefile and on the
1751 # rh-spec (as listed above)
1753 # Revision 1.18 2002/03/21 23:00:00 swa
1754 # want to autogenerate stuff.
1756 # Revision 1.17 2002/03/19 19:30:04 morcego
1757 # - Fixing stylesheet checking on configure. If it is found, no further checks
1760 # - configure will now check for db2html or docbook2html (should work now
1761 # on SuSe without the docbktls package)
1763 # Revision 1.16 2002/03/14 22:32:32 hal9
1764 # Bumped the RPM version.
1766 # Revision 1.15 2002/03/08 20:00:28 swa
1769 # Revision 1.14 2002/03/07 18:25:56 swa
1770 # synced redhat and suse build process
1772 # Revision 1.13 2002/03/07 17:17:56 oes
1773 # (Hopefully) fixed for older make versions
1775 # Revision 1.12 2002/03/07 15:28:27 swa
1778 # Revision 1.11 2002/03/06 14:33:18 sarantis
1779 # Use proper temp file, not "abc".
1781 # Revision 1.10 2002/03/06 14:19:35 sarantis
1782 # Cleanup PID_FILE_PATH from redhat-dist target
1784 # Revision 1.9 2002/03/05 17:31:11 morcego
1785 # Search for docbook.dsl. Should solve portability problems for SuSe.
1787 # Revision 1.8 2002/03/05 14:07:42 morcego
1788 # configure now detects rpm topdir, and change GNUmakefile acordingly
1789 # (based on sugestion by Sarantis Paskalis)
1791 # Revision 1.7 2002/03/05 13:43:28 morcego
1792 # Checking for text browser, so redhat-dok can work.
1794 # Revision 1.6 2002/03/05 13:10:51 morcego
1795 # Changes to implement redhat-dok (Hal Burgiss)
1796 # Changes to make it work on other distros and out-of-the-shelf configurations
1798 # Revision 1.5 2002/02/27 15:30:39 hal9
1799 # Reset $(RPM_PACKAGEV) to 1 (was 2)
1801 # Revision 1.4 2002/01/17 21:44:04 jongfoster
1802 # Adding urlmatch.[ch]
1804 # Revision 1.3 2002/01/04 15:26:08 oes
1805 # Added tarball-src target
1807 # Revision 1.2 2001/12/30 14:07:31 steudten
1808 # - Add signal handling (unix)
1809 # - Add SIGHUP handler (unix)
1810 # - Add creation of pidfile (unix)
1811 # - Add action 'top' in rc file (RH)
1812 # - Add entry 'SIGNALS' to manpage
1813 # - Add exit message to logfile (unix)
1815 # Revision 1.1 2001/12/01 11:22:57 jongfoster
1816 # Renaming Makefile.in to GNUmakefile.in so that non-GNU versions of
1817 # make break in a more obvious way.
1818 # Adding .PHONY section.
1820 # Revision 1.40 2001/12/01 00:24:11 jongfoster
1821 # Renaming various config files
1822 # Fixing CR->CRLF under Win32 (I hope)
1824 # Revision 1.39 2001/11/06 12:07:30 steudten
1825 # Add --clean for building rpm in target redhat-dist.
1827 # Revision 1.38 2001/11/05 21:35:23 steudten
1828 # Complete rewrite for the 'redhat-dist' target.
1829 # Checks for writeable RPM build directories for calling user.
1830 # So you must not be root, just set the modes to 1777 to
1831 # build a RH package.
1832 # Fix the upload-target to be arch independant.
1833 # Add target for 'solaris-dist' - coming soon.
1835 # Revision 1.37 2001/11/01 00:52:04 hal9
1836 # Redhat-upload stuff per Stefan.
1838 # Revision 1.36 2001/10/31 19:26:13 swa
1839 # automate process of uploading new releases
1842 # Revision 1.35 2001/10/15 22:14:59 joergs
1843 # Removed -O2 and -Wall from AmigaOS-only CFLAGS since they are now in
1844 # the general CFLAGS already.
1846 # Revision 1.34 2001/10/15 18:28:06 steudten
1847 # remove config.cache for target clobber.
1848 # Cleanup make dist for RH and S.u.S.E.
1850 # Revision 1.33 2001/10/10 12:43:33 oes
1851 # Added ugly hack to make install target work at least for some setups.
1853 # Revision 1.32 2001/10/09 22:38:19 jongfoster
1854 # Correcting actionsfile filename for Win32 INI build
1856 # Revision 1.31 2001/09/23 10:13:48 swa
1857 # upload process established. run make webserver and
1858 # the documentation is moved to the webserver. documents
1859 # are now linked correctly.
1861 # Revision 1.30 2001/09/19 17:55:49 oes
1864 # Revision 1.29 2001/09/16 17:34:27 jongfoster
1865 # Removing showargs.[ch], adding cgi(simple|edit).[ch]
1866 # Replacing $(OBJEXT) with @OBJEXT@ - this seems to be a common source
1867 # of build problems.
1869 # Revision 1.28 2001/09/13 15:19:08 swa
1870 # we want text files as well.
1872 # Revision 1.27 2001/09/13 13:11:37 steudten
1874 # Replace DEBUG_CFLAGS with OTHER_CFLAGS
1876 # Revision 1.26 2001/09/12 23:44:54 david__schmidt
1877 # Mac OSX (Darwin) support added.
1879 # Revision 1.25 2001/09/12 22:55:45 joergs
1880 # AmigaOS support added.
1882 # Revision 1.24 2001/09/12 17:28:59 david__schmidt
1884 # OS/2 port: update autoconf'd support for the platform.
1886 # Revision 1.23 2001/09/12 16:28:42 swa
1887 # added "make dok" section to generate html pages from
1888 # the sgml source documents. note that the we do not want
1889 # generated stuff in cvs.
1891 # Revision 1.22 2001/09/10 16:31:23 swa
1892 # buildroot definition in the specfile fucks up the build
1893 # process under suse. hence I moved it to the "rpm -ta"
1896 # Revision 1.21 2001/09/10 11:12:49 oes
1899 # Revision 1.20 2001/08/02 22:04:29 jongfoster
1900 # Removing some remaining references to obsolete w32rulesdlg.[ch]
1902 # Revision 1.19 2001/07/30 22:14:03 jongfoster
1903 # Removing obsolete w32rulesdlg.c and w32rulesdlg.h
1905 # Revision 1.18 2001/07/29 17:09:17 jongfoster
1906 # Major changes to build system in order to fix these bugs:
1907 # - pthreads under Linux was broken - changed -lpthread to -pthread
1908 # - Compiling in MinGW32 mode under CygWin now correctly detects
1909 # which shared libraries are available
1910 # - Solaris support (?) (Not tested under Solaris yet)
1912 # Revision 1.17 2001/07/28 16:44:54 oes
1913 # Fixed sed LF->CRLF conversion and removed deprecated files
1915 # Revision 1.16 2001/07/15 19:45:33 jongfoster
1916 # Added support for linking with POSIX threads library
1918 # Revision 1.15 2001/07/13 13:48:07 oes
1919 # - Moved STATIC #define for pcre to (ac)config.h
1920 # - Made -Ipcre depandant on static pcre compilation to
1921 # avoid version conflicts
1922 # - Included compilation and depandancies for new deanimate.c
1923 # - Made changes to the pcre/pcreposix/pcrs build process
1924 # as required by the new library autodetection in
1927 # Revision 1.14 2001/07/01 16:27:44 oes
1928 # Fixed misplaced dependancy
1930 # Revision 1.13 2001/06/29 13:18:36 oes
1931 # - added depandancy of filters.o on cgi.h
1933 # Revision 1.12 2001/06/12 17:15:56 swa
1934 # fixes, because a clean build on rh6.1 was impossible.
1935 # GZIP confuses make, %configure confuses rpm, etc.
1937 # Revision 1.11 2001/06/11 11:26:35 sarantis
1938 # RPM version should be the same as ijbswa version. The rpm release is
1939 # specified in the specfile.
1941 # Revision 1.10 2001/06/07 17:27:45 swa
1942 # added suse build section
1944 # Revision 1.9 2001/06/04 18:31:58 swa
1945 # files are now prefixed with either `confdir' or `logdir'.
1946 # `make redhat-dist' replaces both entries confdir and logdir
1947 # with redhat values
1949 # Revision 1.8 2001/06/04 10:44:57 swa
1950 # `make redhatr-dist' now works. Except for the paths
1951 # in the config file.
1953 # Revision 1.7 2001/06/03 17:09:09 swa
1954 # swa for oes: reversed my earlier change
1956 # Revision 1.6 2001/06/03 17:07:27 swa
1959 # Revision 1.5 2001/06/03 13:57:26 swa
1960 # compile cgi.c (for andreas' GUI)
1962 # Revision 1.4 2001/05/31 21:18:45 jongfoster
1963 # Added files actions.[ch], actionlist.h, list.[ch] to Makefile
1965 # Revision 1.3 2001/05/29 20:02:48 joergs
1966 # Changes for AmigaOS added.
1968 # Revision 1.2 2001/05/17 22:23:23 oes
1969 # - Added auto-generation of CRLFs for Win32 config files
1970 # - Added comment-prefix to all Win32-only options in the config file
1971 # and provided auto stripping of this prefix for the Win32 platform by make
1973 # Revision 1.1.1.1 2001/05/15 13:59:00 oes
1974 # Initial import of version 2.9.3 source tree