Add user.filter to $CONFIGS.
[privoxy.git] / GNUmakefile.in
1 # Note:  Makefile is built automatically from Makefile.in
2 #
3 # $Id: GNUmakefile.in,v 1.141 2006/08/12 03:54:37 david__schmidt Exp $
4 #
5 # Written by and Copyright (C) 2001 - 2004 the SourceForge
6 # Privoxy team. http://www.privoxy.org/
7 #
8 # Based on the Internet Junkbuster originally written
9 # by and Copyright (C) 1997 Anonymous Coders and 
10 # Junkbusters Corporation.  http://www.junkbusters.com
11 #
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.
17 #
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.
23 #
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.
29 #
30
31 #############################################################################
32 # Set make command correctly
33 #############################################################################
34 @SET_MAKE@
35
36 #############################################################################
37 # Version number (for RPM)
38 #############################################################################
39
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)
46 RPM_PACKAGEV  = ""
47 SNAPVERSION   = $(RPM_VERSION)-$(shell date "+%Y%m%d")
48
49
50 #############################################################################
51 # "make install" directories and variables
52 #############################################################################
53
54 #User Group paras
55 USER         = @USER@
56 GROUP      = @GROUP@
57
58 prefix       = @prefix@
59 exec_prefix  = @exec_prefix@
60 CONF_BASE    = @sysconfdir@
61 SBIN_DEST    = @sbindir@
62 MAN_DIR      = @mandir@
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
69
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
73 #
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
77 #
78 # finally if $prefix=/usr/local and VAR_DEST=$prefix/var it 
79 # changes this to /var for storing the logs and pidfile
80
81 # used in source dir only, the install goes to $share_dest/doc/privoxy
82 DOK_WEB = doc/webserver/
83
84 # Install usage should be compatible with install-sh.
85 INSTALL    = @INSTALL@
86 # Binaries
87 BIN_MODE         = 0755
88 # Support files, docs, etc.
89 RA_MODE   = 0664
90 # Directory
91 DIR_MODE   = 0755
92 # Files daemon writes to.
93 RWD_MODE   = 0660
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)
98
99 # install options for superuser install
100 #INSTALL_S  = -g @GROUP@ -o @USER@ 
101
102 #############################################################################
103 # Build tools
104 #############################################################################
105
106 PROGRAM    = privoxy@EXEEXT@
107 CC         = @CC@
108 ECHO       = echo
109 GZIP_PROG  = gzip
110
111 # id -u is not universal. FIXME: need to set from configure. Breaks on
112 # Solaris.
113 #ID         = id -u
114 ID         = id
115 LD         = @CC@
116 RM         = rm -f
117 CP         = cp -f
118 RMDIR      = rmdir
119 MKDIR      = ./mkinstalldirs
120 STRIP_PROG = strip
121 SED           = sed
122 GREP       = grep
123 CAT        = cat
124 RPM        = rpm
125 RPMBUILD   = rpmbuild
126 MV            = mv
127 TAR        = tar
128 LN         = ln
129 TOUCH      = touch
130 KILL       = kill
131 CHMOD      = chmod
132 CHOWN      = chown
133 CHGRP      = chgrp
134 GROUPS     = groups
135 WDUMP      = @WDUMP@ -dump
136 JADECAT    = @JADECAT@
137 JADEBIN    = @JADEBIN@
138 DB         = $(JADEBIN) $(JADECAT) -ihtml -t sgml  -D.. -d ldp.dsl\#html
139 DB2HTML    = @DB2HTML@
140 MAN2HTML   = @MAN2HTML@
141 G2H_CMD    = groff -mandoc -Thtml
142 TARGET_OS  = @host@
143 PERL       = perl
144 DOC_DIR  = doc/source
145 DOC_TMP    = $(DOC_DIR)/tmp
146 DOC_STATUS = @DOC_STATUS@
147
148 # Program to do LF->CRLF
149 #
150 # The sed version should be the most portable, but it doesn't for for me,
151 # the other two do.  FIXME.
152 #   - Jon
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)
158
159 #############################################################################
160 # Setup for make distribution rh and suse for now 
161 #############################################################################
162
163 TAR_ARCH = /tmp/privoxy-$(RPM_VERSION).tar.gz
164 RPM_BASE = @RPM_BASE@
165
166 #############################################################################
167 # We include these files in our distributions
168 #############################################################################
169 CONFIGS = config trust default.action standard.action user.action default.filter user.filter
170 # take care that no CVS .cvsignore or other crappy files
171 # are included here
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"`
175
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"` \
180                 privoxy.1 \
181                 doc/pdf/*.pdf
182
183 #############################################################################
184 # Filenames and libraries
185 #############################################################################
186
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 \
190          urlmatch.c
191
192 C_OBJS = $(C_SRC:.c=.@OBJEXT@)
193 C_HDRS = $(C_SRC:.c=.h) project.h actionlist.h
194
195 W32_SRC   = @WIN_ONLY@w32log.c w32taskbar.c win32.c w32svrapi.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 w32svrapi.h
199 W32_LIB   = @WIN_ONLY@-lwsock32 -lcomctl32
200 W32_INIS  = @WIN_ONLY@config.txt trust.txt
201
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)
205
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
209
210 # No REGEX (maybe because dynamically linked pcreposix):
211 REGEX_SRC    =
212 @STATIC_PCRE_ONLY@REGEX_SRC = pcre/pcreposix.c
213
214 REGEX_OBJS   = $(REGEX_SRC:.c=.@OBJEXT@)
215 REGEX_HDRS   = $(REGEX_SRC:.c=.h)
216
217 # Dependencies introduced by #include "project.h".
218 PROJECT_H_DEPS = project.h $(REGEX_HDRS) $(PCRS_HDRS) @STATIC_PCRE_ONLY@pcre/pcre.h
219
220 # Socket libraries for platforms that need them explicitly defined
221 SOCKET_LIB   = @SOCKET_LIB@
222
223 # PThreads library, if needed.
224 PTHREAD_LIB  = @PTHREAD_ONLY@@PTHREAD_LIB@
225
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)
230
231
232 #############################################################################
233 # Compiler switches
234 #############################################################################
235
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
238 # Win32 GUI build.
239 # The flag "-pthread" is required if using Pthreads under Linux (and
240 # possibly other OSs).
241 SPECIAL_CFLAGS = @SPECIAL_CFLAGS@
242
243 # Add your flags here 
244 OTHER_CFLAGS =   
245
246 CFLAGS = @CFLAGS@ @CPPFLAGS@ $(OTHER_CFLAGS) $(SPECIAL_CFLAGS) -Wall \
247          @STATIC_PCRE_ONLY@ -Ipcre 
248
249 LDFLAGS = $(DEBUG_CFLAGS) $(SPECIAL_CFLAGS)
250
251
252 #############################################################################
253 # Build section.
254 #
255 # There should NOT be any targets above this line.
256 #############################################################################
257 all: $(PROGRAM) default.action
258
259
260 #############################################################################
261 # Phony targets
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
267
268 #############################################################################
269 # Define this explicitly because Solaris is broken!
270 #############################################################################
271 %.o: %.c
272         $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
273
274
275 #############################################################################
276 # Strip master copy comments from default.action:
277 #############################################################################
278 default.action: default.action.master
279         $(GREP) -v '^#MASTER#' $< > $@
280
281 #############################################################################
282 # Win32 config files
283 #############################################################################
284
285 inifiles: $(W32_INIS)
286
287 config.txt: config
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: !!' \
292                < $< | \
293                $(DOSFILTER) > $@
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
298
299 trust.txt: trust
300         $(DOSFILTER) < $< > $@ 
301
302 #############################################################################
303 # Pre-dist check:
304 #############################################################################
305 dist-check:
306         @if [ -d CVS ]; then \
307            $(ECHO) "***************************************************"; \
308            $(ECHO) "***                                             ***"; \
309            $(ECHO) "***                  WARNING                    ***"; \
310            $(ECHO) "***                                             ***"; \
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.                           ***"; \
317            $(ECHO) "***                                             ***"; \
318            $(ECHO) "***************************************************"; \
319            $(ECHO) "Type \"yes i am sure\" if you are sure that you"; \
320            $(ECHO) -n "really want to proceed: "; \
321            read answer; \
322            if [ "$$answer" != "yes i am sure" ]; then exit 1; fi \
323          fi;
324
325
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 #############################################################################
335 create-snapshot:
336         TMPDIR=$(shell mktemp -d /tmp/$(PROGRAM).XXXXXX)
337         @tag=`cvs -d $(CVSROOT) status Makefile | awk ' /Sticky Tag/ { print $$3 } '` 2> /dev/null; \
338         [ x"$$tag" = x"(none)" ] && tag=HEAD; \
339         echo "*** Creating package from $$tag!"; \
340         cd $(TMPDIR) ; cvs -Q -d $(CVSROOT) export -r $$tag current || echo "Um... export aborted."
341         @cd $(TMPDIR)/current; \
342         TMPFILE=$$(mktemp -q /tmp/$(PROGRAM).XXXXXX); \
343         if $(SED) -e 's/^\(Version:\).*/\1 $(RPM_VERSION)/g' \
344                 -e 's/^\(Release:\).*/\1 $(SNAPVERSION)/g' \
345                 privoxy-rh.spec > $$TMPFILE ; then \
346                         $(MV) -f $$TMPFILE privoxy-rh.spec; \
347         else \
348                 $(ECHO) "Could not set version info in specfile."; \
349                 exit 1;\
350         fi;\
351         if $(SED) -e 's/^\(Version:\).*/\1 $(RPM_VERSION)/g' \
352              -e 's/^\(Release:\).*/\1 $(SNAPVERSION)/g' \
353               privoxy-suse.spec > $$TMPFILE ; then \
354                         $(MV) -f $$TMPFILE privoxy-suse.spec; \
355         else \
356                 $(ECHO) "Could not set version info in specfile."; \
357                 exit 1;\
358         fi; \
359         $(RM) $(TMPFILE); \
360         cd $(TMPDIR)/current; \
361         $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude \
362                 "privoxy-suse.spec" -czf $(TMPDIR)/$(PROGRAM)-rh-$(VERSION).tar.gz .; \
363         $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude \
364                 "privoxy-rh.spec" -czf $(TMPDIR)/$(PROGRAM)-suse-$(VERSION).tar.gz .
365         @$(MV) -f $(TMPDIR)/$(PROGRAM)-rh-$(VERSION).tar.gz .
366         @$(MV) -f $(TMPDIR)/$(PROGRAM)-suse-$(VERSION).tar.gz .
367         @$(RM) -rf $(TMPDIR)
368         @echo "Resulting files are $(PROGRAM)-rh-$(VERSION).tar.gz and"
369         @echo "                    $(PROGRAM)-suse-$(VERSION).tar.gz"
370
371
372 #############################################################################
373 # looks at the version of Makefile and exports a corresponding source-tree
374 # example: if the Makefile has the sticky tag v_2_9_13, you'll get 
375 # privoxy-*-2.4.13.tar.gz. Two different tar files will be written, one for
376 # Red Hat and one for SuSe (different spec-files)
377 #############################################################################
378 create-archive:
379         make SNAPVERSION=$(SNAPVERSION) create-snapshot
380
381 #############################################################################
382 # RPM specifice stuff (SuSE or Redhat, ..)
383 #############################################################################
384 rpm-stuff: dist-check clean clobber 
385         for dir in RPMS SRPMS BUILD SOURCES SPECS; do \
386                 if [ ! -w $(RPM_BASE)/$$dir ]; then \
387                         $(ECHO) "$(RPM_BASE)/$$dir is not writable for you. Maybe try as root."; \
388                         $(ECHO) "Or add a suitable path to .rpmmacros like."; \
389                         $(ECHO) "%_topdir /home/foo/rpm-build"; \
390                         exit 1; \
391                 fi; \
392         done; \
393
394 check-release:
395         @if [ "$(RPM_PACKAGEV)" = "" ]; then \
396                 echo ; \
397                 echo "  ERROR: NO RPM_PACKAGEV VALUE"; \
398                 echo "  No value given for RPM_PACKAGEV. Please use:"; \
399                 echo "  make dist-upload RPM_PACKAGEV=release"; \
400                 echo "  where \"release\" is the release number you want to and"; \
401                 echo "  where \"dist\" is the name of the distro (redhat or suse)"; \
402                 echo ; \
403                 echo "  Ex: make redhat-upload RPM_PACKAGEV=1"; \
404                 echo ""; \
405                 echo "ATTENTION: If your distribution use a specific tag on the"; \
406                 echo "           release field (like \"cl\" for Conectiva, and"; \
407                 echo "           \"mdk\" for Mandrake), DO NOT put it on the value"; \
408                 echo "           given to RPM_PACKAGEV. It will be added automaticaly."; \
409                 echo "           Do it like you would do for a redhat package,"; \
410                 echo "           (i.e. just the number)."; \
411                 echo ; \
412                 exit 1; \
413         fi
414
415
416 #############################################################################
417 # Create Conectiva specfile from RedHat specfile
418 #############################################################################
419 conectiva-spec:
420         $(RM) privoxy-cl.spec
421         chmod a+x genclspec.sh
422         ./genclspec.sh
423
424 #############################################################################
425 # Conectiva distribution for x86
426 #############################################################################
427 conectiva-dist: rpm-stuff conectiva-spec
428
429         $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-rh.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
430         $(RPMBUILD) --clean -ta  $(TAR_ARCH)
431         if [ -f $(TAR_ARCH) ]; then  $(RM) $(TAR_ARCH); fi
432
433 conectiva-upload: check-release
434         make redhat-upload RPM_PACKAGEV=$(RPM_PACKAGEV)cl
435
436 #############################################################################
437 # redhat distribution alpha and x86
438 #############################################################################
439 redhat-dist: rpm-stuff
440         echo $(CONFIG_FILES)
441         $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
442         $(RPMBUILD) --clean -ta  $(TAR_ARCH)
443         if [ -f $(TAR_ARCH) ]; then  $(RM) $(TAR_ARCH); fi
444
445 # For testing build issues only! Use redhat-dist for official releases.
446 redhat-test: 
447         echo $(CONFIG_FILES)
448         $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-suse.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
449         $(RPMBUILD) --clean -tb  $(TAR_ARCH)
450         if [ -f $(TAR_ARCH) ]; then  $(RM) $(TAR_ARCH); fi
451         @echo "WARNING: This target is only for testing. Use redhat-dist for releases!!!"
452
453 # anonymously ncftps the rpms to sourceforge
454 redhat-upload: check-release
455         ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/SRPMS/privoxy-$(RPM_VERSION)-$(RPM_PACKAGEV).src.rpm
456 # better should use `arch` here instead of ix86 to support other platforms too
457         ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/RPMS/*/privoxy-$(RPM_VERSION)-$(RPM_PACKAGEV).*.rpm
458         @$(ECHO) -------------------------------------------------------
459         @$(ECHO) Now goto
460         @$(ECHO) http://sourceforge.net/project/admin/editpackages.php?group_id=11118
461         @$(ECHO) ... and release the files.
462         @$(ECHO) -------------------------------------------------------
463      # w3m http://sourceforge.net/project/admin/editpackages.php?group_id=11118
464
465
466 #############################################################################
467 # Creates a Red Hat sourcepackage from CVS (not from the current sources
468 # on disk)
469 #############################################################################
470 redhat-srpm: 
471         make create-archive
472         $(MV) $(PROGRAM)-rh-$(VERSION).tar.gz $(PROGRAM)-$(VERSION).tar.gz
473         $(RPMBUILD) -ts --nodeps $(PROGRAM)-$(VERSION).tar.gz
474
475
476 #############################################################################
477 # suse distribution. works fine. no need to be root. 
478 #############################################################################
479 suse-dist: rpm-stuff
480 #       TMPFILE=$$(mktemp -q /tmp/$(PROGRAM).XXXXXX); \
481 #       if $(SED) -e 's/^\(Version:\).*/\1 $(RPM_VERSION)/g' \
482 #              -e 's/^\(Release:\).*/\1 $(RPM_PACKAGEV)/g' \
483 #               privoxy-suse.spec > $$TMPFILE ; then \
484 #       $(MV) -f $$TMPFILE privoxy-suse.spec; \
485 #       else \
486 #               $(ECHO) "Could not set version info in specfile."; \
487 #       exit 1;\
488 #       fi
489
490         $(TAR) --exclude ".cvsignore" --exclude "CVS" --exclude "privoxy-rh.spec" --exclude "privoxy-cl.spec" --exclude "PACKAGERS" -czf $(TAR_ARCH) .
491         $(RPM) --clean -ta  $(TAR_ARCH)
492         if [ -f $(TAR_ARCH) ]; then  $(RM) $(TAR_ARCH); fi
493
494 # anonymously ncftps the rpms to sourceforge
495 suse-upload: check-release
496         ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/SRPMS/privoxy-suse-$(RPM_VERSION)-$(RPM_PACKAGEV).src.rpm
497 # better should use `arch` here instead of ix86 to support other platforms too
498         ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming $(RPM_BASE)/RPMS/*/privoxy-suse-$(RPM_VERSION)-$(RPM_PACKAGEV).*.rpm
499         @$(ECHO) -------------------------------------------------------
500         @$(ECHO) Now goto
501         @$(ECHO) http://sourceforge.net/project/admin/editpackages.php?group_id=11118
502         @$(ECHO) ... and release the files.
503         @$(ECHO) -------------------------------------------------------
504
505 # handle with care. use with root.
506 suse-clean:
507         $(RPM) -e junkbuster-suse || true
508         $(RM) -r /etc/junkbuster
509         $(RM) -r /etc/rc.d/junkbuster*
510         $(RM) -r /var/run/junkbuster.pid 
511         $(RM) -r /var/log/junkbuster
512         $(RM) /etc/init.d/junkbuster
513         $(RM) /usr/sbin/junkbuster
514         $(RM) /usr/sbin/rcjunkbuster
515         $(RM) /usr/share/man/man1/junkbuster.1.gz
516         $(RPM) -e privoxy-suse || true
517         $(RM) -r /etc/privoxy
518         $(RM) -r /etc/rc.d/privoxy*
519         $(RM) -r /var/run/privoxy.pid 
520         $(RM) -r /var/log/privoxy
521         $(RM) /etc/init.d/privoxy
522         $(RM) /usr/sbin/privoxy
523         $(RM) /usr/sbin/rcprivoxy
524         $(RM) /usr/share/man/man1/privoxy.1.gz
525
526 #############################################################################
527 # generic distribution
528 #############################################################################
529 gen-dist: dist-check
530         @$(ECHO) ""
531         @$(ECHO) "You have run autoconf && autoheader && ./configure right?"
532         @$(ECHO) ""
533         $(MAKE) $(PROGRAM)
534         $(STRIP_PROG) $(PROGRAM)
535         $(LN) -s current ../privoxy-$(VERSION)-$(CODE_STATUS)
536 # add program
537         (cd .. && $(TAR) -cvhf --exclude "PACKAGERS" privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$(PROGRAM))
538 # add config files
539         for foo in $(CONFIG_FILES); do \
540                 (cd .. && $(TAR) -uvhf --exclude "PACKAGERS" privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
541         done; 
542 # add documentation
543         for foo in $(DOC_FILES); do \
544                 (cd .. && $(TAR) -uvhf --exclude "PACKAGERS" privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar privoxy-$(VERSION)-$(CODE_STATUS)/$$foo;) \
545         done;
546 # and zip the archive
547         $(RM) ../privoxy-$(VERSION)-$(CODE_STATUS)
548         $(GZIP_PROG) ../privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar
549         @$(ECHO) Distribution with binary created.
550
551 # anonymously ncftps the package to sourceforge
552 gen-upload:
553         ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming ../privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar.gz
554         @$(ECHO) -------------------------------------------------------
555         @$(ECHO) Now goto
556         @$(ECHO) http://sourceforge.net/project/admin/editpackages.php?group_id=11118
557         @$(ECHO) ... and release the files.
558         @$(ECHO) -------------------------------------------------------
559
560 # use with care
561 gen-clean:
562         $(RM) privoxy-$(TARGET_OS)-$(VERSION)-$(CODE_STATUS)-src.tar*
563
564 #############################################################################
565 # solaris distribution. verified on SF machines by swa.
566 #############################################################################
567 solaris-dist: gen-dist
568         @$(ECHO) Done.
569 # anonymously ncftps the package to sourceforge
570 solaris-upload: gen-upload
571         @$(ECHO) Done.
572 # use with care
573 solaris-clean: gen-clean
574         @$(ECHO) Done.
575
576 #############################################################################
577 # hpux distribution
578 #############################################################################
579 hpux-dist:
580         @$(ECHO) coming soon. 
581 hpux-upload:
582         @$(ECHO) coming soon. 
583
584 #############################################################################
585 # debian distribution
586 #############################################################################
587 debian-dist:
588         @$(ECHO) coming soon. 
589 debian-upload:
590         @$(ECHO) coming soon. 
591
592 #############################################################################
593 # macosx distribution
594 #############################################################################
595 macosx-dist:
596         @$(ECHO) coming soon. 
597 macosx-upload:
598         @$(ECHO) coming soon. 
599
600 #############################################################################
601 # amiga distribution
602 #############################################################################
603 amiga-dist:
604         @$(ECHO) coming soon. 
605 amiga-upload:
606         @$(ECHO) coming soon. 
607
608 #############################################################################
609 # freebsd distribution. verified on SF machines by swa.
610 #############################################################################
611 freebsd-dist: gen-dist
612         @$(ECHO) Done.
613 # anonymously ncftps the package to sourceforge
614 freebsd-upload: gen-upload
615         @$(ECHO) Done.
616 # use with care
617 freebsd-clean: gen-clean
618         @$(ECHO) Done.
619
620 #############################################################################
621 # Windows distribution
622 #############################################################################
623 win-dist:
624         $(ECHO) Not implemented.
625
626
627 #############################################################################
628 # Tarball distribution: No CVS dirs, dotfiles, debian build dir,
629 # (FIXME:) only parts of the static / generated docs mix in doc/webserver
630 #############################################################################
631
632 tarball-dist: dist-check clean clobber
633         $(LN) -s current ../privoxy-$(VERSION)-$(CODE_STATUS)
634
635         for i in `find . -type f -a -not \( -path "*/CVS*" -o -name ".*" \
636         -o -path "*/debian/*" -o -path "*/actions/*" -o -name "*.php" -o \
637         -name "PACKAGERS" -o -path "*/pdf/*" \)`; do \
638            files="$$files privoxy-$(VERSION)-$(CODE_STATUS)/$$i"; \
639         done &&  \
640         cd .. && $(TAR) -cvhf privoxy-$(VERSION)-$(CODE_STATUS)-src.tar $$files ; \
641
642 # and zip the archive
643         $(RM) ../privoxy-$(VERSION)-$(CODE_STATUS) 
644         $(GZIP_PROG) ../privoxy-$(VERSION)-$(CODE_STATUS)-src.tar
645         @$(ECHO) Tarball distribution created.
646
647 # anonymously ncftps the tarball to sourceforge
648 tarball-upload:
649         ncftpput -u anonymous -p ijbswa-developers@lists.sourceforge.net upload.sourceforge.net /incoming ../privoxy-$(VERSION)-$(CODE_STATUS)-src.tar.gz
650         @$(ECHO) -------------------------------------------------------
651         @$(ECHO) Now goto
652         @$(ECHO) http://sourceforge.net/project/admin/editpackages.php?group_id=11118
653         @$(ECHO) ... and release the files.
654         @$(ECHO) -------------------------------------------------------
655
656 tarball-clean:
657         $(RM) ../privoxy-$(VERSION)-$(CODE_STATUS)-src.tar.gz
658
659 #############################################################################
660 #
661 # Documentation
662 #
663 # converts doc/source/*.sgml into html, text and man pages
664 #
665 #############################################################################
666
667 # developer manual
668 dok-devel: 
669         $(RM) doc/webserver/developer-manual/*.html
670         $(RM) -r doc/source/developer-manual
671         mkdir -p doc/text doc/source/developer-manual
672         cd doc/source/developer-manual && $(DB) ../developer-manual.sgml && cd .. && cp developer-manual/*.html ../webserver/developer-manual/
673         cd doc/source && $(DB) -V nochunks developer-manual.sgml > tmp.html && $(WDUMP) tmp.html > ../text/developer-manual.txt && $(RM) -r tmp.html developer-manual
674
675 # user manual
676 dok-user: 
677         $(RM) doc/webserver/user-manual/*.html
678         $(RM) -r doc/source/user-manual/
679         mkdir -p doc/text doc/source/user-manual
680         cd doc/source/user-manual && $(DB) -iuser-man ../user-manual.sgml && cd .. && cp user-manual/*.html ../webserver/user-manual/
681         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
682
683 # faq
684 dok-faq: 
685         $(RM) doc/webserver/faq/*.html
686         $(RM) -r doc/source/faq
687         mkdir -p doc/text doc/source/faq
688         cd doc/source/faq && $(DB) ../faq.sgml && cd .. && cp faq/*.html ../webserver/faq/
689         cd doc/source && $(DB) -V nochunks faq.sgml > tmp.html && $(WDUMP) tmp.html > ../text/faq.txt && $(RM) -r tmp.html faq
690
691 # man page, one variation. Try to use the next target, just 'make man'. 
692 dok-man: 
693         $(RM) doc/man/* doc/webserver/man-page/*.html
694 ifneq ($(MAN2HTML),false)
695         $(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
696         man ./privoxy.1 | $(MAN2HTML) -bare >> doc/webserver/man-page/privoxy-man-page.html
697         $(ECHO) "</body></html>" >> doc/webserver/man-page/privoxy-man-page.html
698 else
699         $(MAKE) groff2html
700 endif
701
702 # Build man page from sgml. This requires the SGMLSpm perl module.
703 # See CPAN, or your favorite perl repository. This is the preferred 
704 # target for man page generation!
705 man: dok-release
706         mkdir -p doc/source/temp && cd doc/source/temp && $(RM) * ;\
707         nsgmls ../privoxy-man-page.sgml  | sgmlspl ../../../utils/docbook2man/docbook2man-spec.pl &&\
708         perl -pi.bak -e 's/ <URL:.*>//; s/\[ /\[/g' privoxy.1 ;\
709         $(DB) ../privoxy-man-page.sgml && $(MV) -f privoxy.1 ../../../privoxy.1
710
711 # For those with man2html ala RH7s.
712 man2html:
713         mkdir -p doc/webserver/man-page
714 ifneq ($(MAN2HTML),false)
715         $(MAN2HTML) privoxy.1 |grep -v "^Content-type" > tmp.html
716         $(PERL) -pi.bak -e 's/<A .*Contents<\/A>//; s/<A .*man2html<\/A>/man2html/' tmp.html
717         $(PERL) -pi.bak -e 's/(<\/HEAD>)/<LINK REL=\"STYLESHEET\" TYPE=\"text\/css\" HREF=\"..\/p_doc.css\"><\/HEAD>/' tmp.html
718 # Twice because my version of man2html is pulling in commas and periods in URLs.
719         $(PERL) -pi.bak -e 's/(<A.*),(">)/$$1$$2/g' tmp.html
720         $(PERL) -pi.bak -e 's,\.">,">,g' tmp.html
721 # Get rid of spurious \a from conversion. (How to do this with perl?)
722         $(SED) -e 's/\a//g' tmp.html > doc/webserver/man-page/privoxy-man-page.html && $(RM) tmp.*
723 else
724         $(MAKE) groff2html
725 endif
726
727
728 # Otherwise we get plain groff conversion.
729 groff2html:
730         $(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
732
733 # readme page and INSTALL file
734 dok-readme: dok-release
735         cd doc/source && $(DB)-notoc -V nochunks readme.sgml > tmp.html &&\
736         $(WDUMP) tmp.html > ../../README ;\
737         $(DB)-notoc -V nochunks install.sgml > tmp.html &&\
738         $(WDUMP) tmp.html > ../../INSTALL ;\
739         $(RM) tmp.*
740
741 # index.sgml is used to create both the Home Page, and a local index
742 # for documentation, etc.
743 #
744 # index.html for webserver:
745 dok-webserver: 
746         cd doc/source/webserver && $(DB)-notoc -ip-homepage -V nochunks index.sgml > ../../webserver/index.html
747         $(PERL) -pi.bak -e 's/..\/p_doc.css/p_doc.css/;\
748      s/<\/HEAD/\n<meta name=\"description\" content=\"Privoxy helps consumers reduce unwanted junk email and protect their privacy from direct marketing companies.\"><\/HEAD/;\
749         s/<\/HEAD/\n<meta name="MSSmartTagsPreventParsing" content="TRUE"><\/HEAD/;\
750         s/\.\d\. //;\
751         s/__copy/&copy;/'\
752      doc/webserver/index.html && $(RM) doc/webserver/*.bak
753
754 # privoxy-index.html for local documentation:
755 dok-index: 
756         cd doc/source/webserver && $(DB)-notoc -ip-index -V nochunks index.sgml > ../../webserver/privoxy-index.html
757         $(PERL) -pi.bak -e 's/..\/p_doc.css/p_doc.css/;\
758      s/<\/HEAD/\n<meta name=\"description\" content=\"Privoxy helps consumers reduce unwanted junk email and protect their privacy from direct marketing companies.\"><\/HEAD/;\
759         s/<\/HEAD/\n<meta name="MSSmartTagsPreventParsing" content="TRUE"><\/HEAD/;\
760         s/\.\d\. //;\
761         s/__copy/&copy;/' \
762      doc/webserver/privoxy-index.html && $(RM) doc/webserver/*.bak
763
764 # Main documentation target.
765 dok: dok-release dok-devel dok-user dok-faq dok-readme dok-webserver dok-authors dok-index
766         @$(ECHO) Documentation created.
767
768 #
769 # an alternative to the above dok. disabled man page creation for the moment
770 #
771 redhat-dok: dok-release dok-devel dok-user dok-faq redhat-readme dok-webserver dok-authors
772         @$(ECHO) Documentation created.
773
774 ## Make README
775 redhat-readme: 
776         cd doc/source && $(DB)-notoc -V nochunks readme.sgml > tmp.html && $(WDUMP) \
777           tmp.html > ../../README && $(RM) -r tmp.html
778
779 ## Make AUTHORS file
780 dok-authors: 
781         cd doc/source && $(DB) -V nochunks authors.sgml > tmp.html && $(WDUMP) \
782           tmp.html > ../../AUTHORS && $(RM) tmp.html
783
784 # Set doc entities for VERSION and CODE_STATUS in sgml docs. Toggle content
785 # exceptions accordingly. This needs to go before any doc building (doh).
786 dok-release:
787         @$(ECHO) Setting doc version and status to $(VERSION), $(CODE_STATUS)
788         @$(PERL) -pi.bak -e 's/<!entity +p-version.*>/<!entity p-version "$(VERSION)">/;\
789      s/<!entity +p-status.*>/<!entity p-status "$(CODE_STATUS)">/' \
790      doc/source/*sgml doc/source/*/*sgml
791         $(RM) -r doc/source/*bak doc/source/*/*bak
792 ifeq ($(CODE_STATUS),stable)
793         @$(ECHO) Setting docs to stable $(VERSION)
794         @$(PERL) -pi.bak -e 's/<!entity +% +p-stable.*>/<!entity % p-stable "INCLUDE">/;\
795      s/<!entity +% +p-not-stable.*>/<!entity % p-not-stable "IGNORE">/' \
796      doc/source/*sgml doc/source/*/*sgml
797         $(RM) -r doc/source/*bak doc/source/*/*bak
798 else
799         @$(ECHO) Setting docs to not stable $(VERSION)
800         @$(PERL) -pi.bak -e 's/<!entity +% +p-stable.*>/<!entity % p-stable "IGNORE">/;\
801      s/<!entity +% +p-not-stable.*>/<!entity % p-not-stable "INCLUDE">/' \
802      doc/source/*sgml doc/source/*/*sgml
803         $(RM) -r doc/source/*bak doc/source/*/*bak
804 endif
805
806 # Generate single page html. Used only for creating pdf docs (ATM).
807 # Currently using: See http://www.easysw.com/htmldoc/pdf-o-matic.php.
808 # If using this generator, remember U-M has a couple of graphics in 
809 # a parallel directory.
810 #
811 dok-shtml: dok-release 
812         mkdir -p doc/source/temp # this directory not in cvs
813         cd doc/source && $(DB) -iuser-man -V nochunks user-manual.sgml > temp/privoxy-user-manual.html
814         cd doc/source && $(DB) -V nochunks developer-manual.sgml > temp/privoxy-developer-manual.html
815         cd doc/source && $(DB) -V nochunks faq.sgml > temp/privoxy-faq.html
816 # one could use html2ps and ps2pdf. well, that does not work. htmlps produces incorrect output.
817
818 # Make pdf docs from single page html. Requires htmldoc, see
819 # (http://www.easysw.com/htmldoc/). Note: 1.8.20 has a TOC bug.
820 # PDF docs are uploaded to webserver as zip archive.
821 dok-pdf: dok-shtml
822         @$(ECHO) -n "starting htmldoc version: ";
823         if htmldoc --version ; then : ; \
824            else $(ECHO) "WARNING: could not get htmldoc version" ; fi
825         cd utils/ldp_print && $(RM) *html *bak *jpg *tmp *pdf *zip
826         cp -f doc/source/temp/*html doc/webserver/images/*jpg utils/ldp_print
827         cd utils/ldp_print ;\
828         $(PERL) -pi.bak -e 's/\.\.\/images\///; s/(<\/?)SUB/$$1small/i;\
829                             s/\.\.\/user-manual\/index\.html/privoxy-user-manual.pdf/;\
830                                         s/\.\.\/developer-manual\/index\.html/privoxy-developer-manual.pdf/;\
831                                         s/\.\.\/faq\/index\.html/privoxy-faq.pdf/' *.html ;\
832         for i in developer-manual user-manual faq; do \
833                 ./ldp_print privoxy-$$i.html ;\
834                 $(ECHO) DONE: privoxy-$$i.pdf ;\
835         done ;\
836         $(MV) *.pdf  ../../doc/pdf ;\
837         $(RM) -r *html *bak *jpg *pdf *zip ../../doc/source/temp
838
839 # Create release announcement in text and html, with short and long versions.
840 # This is a standalone target, and must be invoked directly.
841 # announce: dok-release
842 #       mkdir -p $(DOC_TMP)
843 #       cd $(DOC_TMP) && cp -f ../announce.sgml . && $(DB) -iannounce-big announce.sgml &&\
844 #       mv -f index.html announce.html && $(WDUMP) announce.html > announce.txt
845 #       cd $(DOC_TMP) && $(DB) announce.sgml &&\
846 #       mv -f index.html announce-mini.html && $(WDUMP) announce-mini.html > announce-mini.txt &&\
847 #       mv -f *html *txt ../../.. 
848 #       rm -fr $(DOC_TMP)
849
850 # The main Privoxy config file, generated from sgml sources. 
851 # NOTE: This will require some hand editing. The new file is outputted 
852 # as config.new so that problem sections can be compared to previous
853 # version. This is hardcored to w3m for html/text conversion. Also, 
854 # requires the shell util 'fmt'.
855 config-file: dok-release
856         cd doc/source && $(DB)-notoc -iconfig-file -V nochunks config.sgml > __tmp.html &&\
857         w3m -dump __tmp.html |fmt -w 70 > ../../config.new && $(RM) -r __tmp.*
858         $(PERL) -pi.bak -e 's/^1\. \@\@TITLE\@\@/     /i;\
859                      /^\d\.\d\.\s+/ && tr/[a-z]/[A-Z]/;\
860                      $$header_len=0 unless $$hit_header;\
861                      if ($$hit_header) {\
862                         print "#  ";\
863                         for ($$i=1; $$i < $$header_len; $$i++) {print "=";}\
864                         print "\n";\
865                      };\
866                      $$hit_header=0;\
867                      $$hit_header=1 if m/^(\d\.)(\d\.)(\d\.)?\s/ && s/^(\d\.)//;\
868                      $$header_len = length($$_);\
869                                  s/^/#  /;  /^#  #{12,}/ && s/^#  #/####/;\
870                      s/^.*$$// if $$hit_option;\
871                      $$hit_option=0;\
872                      s/^\n//;  s/^#\s*-{20,}//; s/ *$$//;\
873                      $$hit_option=1 if s/^#\s+@@//;'   config.new
874         $(RM) *.bak
875         @$(ECHO)  "****************************************************"
876         @$(ECHO)  "The output file is config.new."
877         @$(ECHO)  "Now -- you need to hand edit the results!!!"
878         @$(ECHO)  "In particular, check the Debug levels, the"
879         @$(ECHO)  "permit-access, forward & socks examples and the"
880         @$(ECHO)  "various user-manual examples, which all"
881         @$(ECHO)  "probably got hammered."
882         @$(ECHO)  "****************************************************"
883
884 # config file, alternate verison using lynx (perl stuff unfinished). Lynx
885 # does not do so good a job.
886 config-file-alt: 
887         cd doc/source && $(ECHO) -e ".h2 JUSTIFY\\nJUSTIFY:FALSE" > __tmp.lynx_cfg &&\
888         $(DB)-notoc -iconfig-file -V nochunks config.sgml > __tmp.html &&\
889         lynx -cfg=__tmp.lynx_cfg -width=78 -dump __tmp.html > ../../config.new && $(RM) -r __tmp.*
890         $(PERL) -pi -e 's/^(   )//;\
891                         s/:$\/:\n/' config.new
892
893 #############################################################################
894 #
895 # Webserver
896 #
897 # moves dokumentation to webserver
898 #
899 #############################################################################
900 webserver: tidy
901         @$(ECHO) -------------------------------------------------------
902         @$(ECHO) You have run make dok/redhat-dok before, right?
903         @$(ECHO) Note that this command scps all stuff to the webserver,
904         @$(ECHO) it will not remove obsolete documents.
905         @$(ECHO) -------------------------------------------------------
906
907         @$(ECHO) Uploading html
908         @cd doc/webserver; \
909           upload=`find . -type f -a -not \( -path "*/CVS*" -o -path "*/results*" \)`; \
910           $(TAR) c $$upload | ssh ijbswa.sourceforge.net 'cd /home/groups/i/ij/ijbswa/htdocs/; tar xvm 2>&1 | grep -v timestamp'
911
912         @$(ECHO) Uploading pdf
913         @cd doc/pdf;\
914           zip privoxy-pdf-docs *.pdf  ;\
915                 scp -q privoxy-pdf-docs.zip ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/pdf
916
917         @$(ECHO) Fixing permissions
918         @ssh ijbswa.sourceforge.net 'chmod -R 775 /home/groups/i/ij/ijbswa/htdocs 2>/dev/null; true'
919         @ssh ijbswa.sourceforge.net 'find /home/groups/i/ij/ijbswa/htdocs/ -type f | xargs chmod 664 2>/dev/null; true'
920         @ssh ijbswa.sourceforge.net 'chmod 666 /home/groups/i/ij/ijbswa/htdocs/actions/results/actions-feedback.txt 2>/dev/null; true'
921
922
923 web-actions: tidy
924         @$(ECHO) Uploading 
925         @cd doc/webserver/actions; \
926           upload=`find . -type f -a -not \( -path "*/CVS*" -o -path "*/results*" \)`; \
927           $(TAR) c $$upload | ssh ijbswa.sourceforge.net 'cd /home/groups/i/ij/ijbswa/htdocs/actions; tar xvm'
928
929         @$(ECHO) Fixing permissions
930         @ssh ijbswa.sourceforge.net 'find /home/groups/i/ij/ijbswa/htdocs/actions/ -type f | xargs chmod 664 2>/dev/null'
931         @ssh ijbswa.sourceforge.net 'chmod 666 /home/groups/i/ij/ijbswa/htdocs/actions/results/actions-feedback.txt 2>/dev/null'
932
933 ## 
934 dok-put:
935         tar --exclude ".cvsignore" --exclude "CVS" --exclude "source" --exclude ".htaccess" \
936              --exclude "obsolete" --exclude "actions" --exclude "*.zip" --exclude "robots.txt"\
937                 doc/* INSTALL LICENSE AUTHORS README \
938                 -czf $(DOC_FILE) ;\
939                 $(ECHO) "Uploading doc package ..." ;\
940                 scp $(DOC_FILE) ijbswa.sourceforge.net:/home/groups/i/ij/ijbswa/htdocs/docs/
941                 @ssh ijbswa.sourceforge.net 'chmod 775 /home/groups/i/ij/ijbswa/htdocs/docs/*gz 2>/dev/null; true'
942                 $(RM) $(DOC_FILE)
943
944 dok-get:
945         cd /tmp ;\
946         $(WGET) http://privoxy.org/docs/$(DOC_FILE) ;\
947         $(TAR) -zxvf $(DOC_FILE)
948
949
950 #############################################################################
951 # Source file dependencies
952 #############################################################################
953
954 actions.@OBJEXT@:   actions.c   actions.h   config.h $(PROJECT_H_DEPS) errlog.h jcc.h list.h loaders.h miscutil.h actionlist.h ssplit.h
955 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
956 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
957 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
958 deanimate.@OBJEXT@: deanimate.c deanimate.h config.h $(PROJECT_H_DEPS)
959 encode.@OBJEXT@:    encode.c    encode.h    config.h
960 errlog.@OBJEXT@:    errlog.c    errlog.h    config.h $(PROJECT_H_DEPS) @WIN_ONLY@w32log.h
961 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 
962 gateway.@OBJEXT@:   gateway.c   gateway.h   config.h $(PROJECT_H_DEPS) errlog.h jbsockets.h jcc.h loadcfg.h
963 jbsockets.@OBJEXT@: jbsockets.c jbsockets.h config.h $(PROJECT_H_DEPS) filters.h
964 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 w32svrapi.h cgi.h
965 killpopup.@OBJEXT@: killpopup.c killpopup.h config.h $(PROJECT_H_DEPS) jcc.h loadcfg.h
966 list.@OBJEXT@:      list.c      list.h      config.h $(PROJECT_H_DEPS) list.h miscutil.h
967 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
968 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
969 miscutil.@OBJEXT@:  miscutil.c  miscutil.h  config.h
970 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
971 ssplit.@OBJEXT@:    ssplit.c    ssplit.h    config.h miscutil.h
972 urlmatch.@OBJEXT@:  urlmatch.c  urlmatch.h  config.h $(PROJECT_H_DEPS) errlog.h miscutil.h ssplit.h
973
974 # GNU regex
975 gnu_regex.@OBJEXT@: gnu_regex.c gnu_regex.h config.h
976
977 # PCRS
978 pcrs.@OBJEXT@: pcrs.c pcrs.h config.h pcre/pcre.h 
979
980 # PCRE
981 pcre/get.@OBJEXT@:        pcre/get.c        pcre/config.h pcre/internal.h pcre/pcre.h
982 pcre/maketables.@OBJEXT@: pcre/maketables.c pcre/config.h pcre/internal.h pcre/pcre.h
983 pcre/pcre.@OBJEXT@:       pcre/pcre.c       pcre/config.h pcre/internal.h pcre/pcre.h pcre/chartables.c 
984 pcre/pcreposix.@OBJEXT@:  pcre/pcreposix.c  pcre/config.h pcre/internal.h pcre/pcre.h pcre/pcreposix.h
985 pcre/study.@OBJEXT@:      pcre/study.c      pcre/config.h pcre/internal.h pcre/pcre.h
986
987 # An auxiliary program makes the PCRE default character table source
988
989 pcre/chartables.c:   pcre/dftables@EXEEXT@
990                 pcre/dftables@EXEEXT@ >pcre/chartables.c
991
992 pcre/dftables@EXEEXT@:       pcre/dftables.c pcre/maketables.c pcre/pcre.h pcre/internal.h pcre/config.h
993                 $(CC) -o pcre/dftables@EXEEXT@ $(CFLAGS) pcre/dftables.c
994
995 # Win32
996 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
997 w32taskbar.@OBJEXT@: w32taskbar.c config.h w32log.h w32taskbar.h
998 win32.@OBJEXT@: win32.c config.h jcc.h loadcfg.h pcre/pcre.h pcre/pcreposix.h pcrs.h project.h w32log.h win32.h w32svrapi.h
999
1000 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
1001         windres -D__MINGW32__=0.2 -O coff -i $< -o $@
1002
1003 # AmigaOS
1004 @AMIGAOS_ONLY@OBJS += amiga.o
1005 @AMIGAOS_ONLY@CFLAGS += -D__AMIGAVERSION__=\"$(VERSION_MAJOR).$(VERSION_MINOR)$(VERSION_POINT)\" -D__AMIGADATE__=\"`date +%d.%m.%Y`\" -W -m68020 -noixemul -fbaserel -msmall-code
1006 @AMIGAOS_ONLY@LDFLAGS += -m68020 -noixemul -fbaserel
1007 @AMIGAOS_ONLY@LIBS = -lm /gg/lib/libb/libm020/libnix/swapstack.o
1008 @AMIGAOS_ONLY@amiga.o: amiga.c amiga.h config.h
1009
1010
1011 $(PROGRAM): $(OBJS) $(W32_FILES)
1012         $(LD) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
1013
1014 clean:
1015         $(RM) a.out $(OBJS) $(W32_FILES) $(W32_INIS) $(PROGRAM) default.action `find . -name TAGS -o -name tags` 
1016
1017 tidy:
1018         $(RM) `find . -name "*~"`
1019 #       $(RM) `find . -name "#*#"` # what is this for??
1020         $(RM) `find . -name ".\#*"`
1021
1022 clobber: tidy
1023         $(RM) GNUmakefile configure config.h.in config.h config.cache config.status config.log logfile \
1024               privoxy.log core *.tar.gz *.tar privoxy-cl.spec doc/source/ldp.dsl
1025         $(RM) -r autom4te.cache
1026
1027 #
1028 # FIXME: What is all this? 
1029 #
1030         $(RM) cscope.*  *.pdb *.lib *.exp 
1031
1032 distclean: clobber
1033
1034 tags: $(SRCS) $(HDRS)
1035         etags $(SRCS) $(HDRS)
1036
1037 CONF_DEST:=$(shell if [ "$(prefix)" = "/usr/local" ] && [ "$(CONF_BASE)" = "$(prefix)/etc" ];then \
1038                 $(ECHO) "$(CONF_BASE)/privoxy";\
1039          else\
1040                  $(ECHO) "$(CONF_BASE)";\
1041          fi)
1042
1043 LOG_DEST:=$(shell if [ "$(prefix)" = "/usr/local" ] && [ "$(LOGS_DEST)" = "$(prefix)/var/log/privoxy" ];then \
1044                 $(ECHO) "/var/log/privoxy" ;\
1045          else\
1046                  $(ECHO) "$(LOGS_DEST)";\
1047          fi)
1048
1049 PID_DEST:=$(shell if [ "$(prefix)" = "/usr/local" ] && [ "$(PIDS_DEST)" = "$(prefix)/var/run" ];then \
1050                 $(ECHO) "/var/run" ;\
1051          else\
1052                  $(ECHO) "$(PIDS_DEST)";\
1053          fi)
1054
1055 check_doc:=$(shell if [ ! -d "$(SHARE_DEST)/doc" ] && [ "$(prefix)" = "/usr/local" ]  && [ -d "$(prefix)/doc" ];then \
1056                 $(ECHO) "1";\
1057          else\
1058                  $(ECHO) "0";\
1059          fi)
1060
1061 # If USER is specified but no GROUP, assume there is a GROUP of same name.
1062 GROUP_T:=$(shell if [ x$(GROUP) = x ] && [ x$(USER) != x ];then \
1063                 $(ECHO) "$(USER)" ;\
1064          else\
1065                  $(ECHO) "$(GROUP)";\
1066          fi)
1067
1068 install-strip:
1069         $(MAKE) install STRIP=-s
1070
1071 # FIXME: Test USER and GROUP on Slack to make sure this works as 
1072 # intended.
1073 #
1074 # FIXME: id handling needs help, probably via configure, since 'id -u' is not 
1075 # universally reliable (eg Solaris). Group handling could be better. 
1076 # Perhaps the whole user/group validation should be done here, and simplified.
1077 PROGRAM_V = Privoxy $(VERSION)
1078 install: CONF_DEST LOG_DEST PID_DEST check_doc GROUP_T
1079         @# Quick test for valid USER.
1080         @if [ -n "$(USER)" ]; then \
1081                 $(ID) $(USER) >/dev/null || exit 1;\
1082         fi
1083         @# Test for valid group. FIXME. USER does not have to belong to GROUP 
1084         @# for file ownership purposes.
1085 #       if [ -n "$(GROUP_T)" ] && [ -n "$(USER)" ] && ! $(GROUPS) $(USER) | $(GREP) "\<$(GROUP_T)\>" >/dev/null; then \
1086 #               $(ECHO) Group $(GROUP_T) for User $(USER) is invalid && exit 1 ;\
1087 #       fi
1088
1089         @$(ECHO) "Creating directories, and preparing $(PROGRAM_V) installation"
1090         $(CHMOD) $(DIR_MODE) $(MKDIR)
1091         @$(MKDIR) $(SBIN_DEST) $(prefix) $(CONF_DEST) $(CONF_DEST)/templates $(SHARE_DEST) \
1092                 $(LOG_DEST) $(PID_DEST)
1093         @# Install the executable binary, strip if invoked as install-strip
1094         @test -n "$(STRIP)" &&\
1095         $(ECHO) Installing $(PROGRAM) stripped executable to $(SBIN_DEST) ||\
1096         $(ECHO) Installing $(PROGRAM) executable to $(SBIN_DEST)
1097         $(INSTALL) $(INSTALL_P) $(STRIP) $(PROGRAM) $(SBIN_DEST)
1098      
1099         @# Install the DOCS and man page. install-sh only does one file at a time.
1100         -@if [ $(check_doc) = 0 ]; then \
1101                 DOC=$(DOC_DEST) ;\
1102         else \
1103                 DOC=$(prefix)/doc/privoxy ;\
1104         fi;\
1105         $(MKDIR) $$DOC $$DOC/user-manual $$DOC/faq $$DOC/developer-manual \
1106              $$DOC/man-page $$DOC/images $(MAN_DEST) ;\
1107         if [ -d "$(DOK_WEB)" ]; then \
1108                 $(ECHO) Installing FAQ, Manual, and other docs to $$DOC;\
1109           for i in user-manual developer-manual faq; do \
1110                for ii in $(DOK_WEB)/$$i/*html; do \
1111                     $(INSTALL) $(INSTALL_T) $$ii $$DOC/$$i;\
1112                done ;\
1113           done ;\
1114           for i in $(DOK_WEB)/images/*jpg; do \
1115                $(INSTALL) $(INSTALL_T) $$i $$DOC/images;\
1116           done ;\
1117                 $(INSTALL) $(INSTALL_T) $(DOK_WEB)/man-page/*html $$DOC/man-page;\
1118                 $(INSTALL) $(INSTALL_T) $(DOK_WEB)/privoxy-index.html $$DOC/index.html;\
1119                 $(INSTALL) $(INSTALL_T) AUTHORS $$DOC;\
1120                 $(INSTALL) $(INSTALL_T) LICENSE $$DOC;\
1121                 $(INSTALL) $(INSTALL_T) README $$DOC;\
1122                 $(INSTALL) $(INSTALL_T) ChangeLog $$DOC;\
1123                 $(INSTALL) $(INSTALL_T) $(DOK_WEB)/p_doc.css $$DOC;\
1124         fi
1125         @# Not all platforms support gzipped man pages.
1126         @$(ECHO) Installing man page to $(MAN_DEST)/privoxy.1
1127         -$(INSTALL) $(INSTALL_T) privoxy.1  $(MAN_DEST)/privoxy.1
1128
1129         @# Change the config file default directories according to the configured ones
1130         @$(ECHO) Rewriting config for this installation
1131         @if [ -f config.base ] ; then \
1132                 $(CAT) config >config~ ;\
1133                 $(MV) config.base config ;\
1134         fi
1135         $(SED) 's+confdir .+confdir $(CONF_DEST)+' config | \
1136         $(SED) 's+logdir .+logdir $(LOG_DEST)+' >config.updated
1137         $(MV) config config.base
1138         $(MV) config.updated config 
1139
1140         @# Install the config support files. Test for root install, and abort 
1141         @# if there is no privoxy user, and no other user was enabled during 
1142         @# configure. Later, install init script if appropriate.
1143         @$(ECHO) Installing templates to $(CONF_DEST)/templates
1144         @for i in `find templates -type f`; do \
1145                 $(INSTALL) $(INSTALL_T) $$i $(CONF_DEST)/templates ;\
1146         done
1147
1148         @# FIXME: group/user validation is overly convoluted.
1149         @# If superuser install ... we require a minimum of group ownership
1150         @# of those files the daemon writes to, to be non-root owned.
1151         @if [ "`$(ID) |sed 's/(.*//' |sed 's/.*=//'`" = "0" ] ;then\
1152                 if [ x$(USER) = x ] || [ $(USER) = root ]; then \
1153                         if [ x$(GROUP) = x ] || [ $(GROUP) = root ]; then \
1154                                 if [ "`$(ID) privoxy`" ] && \
1155                                         $(GROUPS) privoxy | $(SED) 's/^.*://' |$(GREP) "\<privoxy\>" >/dev/null; then \
1156                                         $(ECHO) "Warning: Setting group owner to privoxy";\
1157                                         GROUP_T=privoxy ;\
1158                                 else \
1159                                         $(ECHO)  "******************************************************************" ;\
1160                                         $(ECHO)  " WARNING! WARNING! installing config files as root!" ;\
1161                                         $(ECHO)  " It is strongly recommended to run $(PROGRAM) as a non-root user," ;\
1162                                         $(ECHO)  " and to install the config files as that user and/or group!" ;\
1163                                         $(ECHO)  " Please read INSTALL, and create a privoxy user and group!" ;\
1164                                         $(ECHO)  "*******************************************************************" ;\
1165                                         exit 1 ;\
1166                                 fi ;\
1167                         else \
1168                                 GROUP_T=$(GROUP) ;\
1169                         fi ;\
1170                         INSTALL_CONF="$(INSTALL_R) -g $$GROUP_T " ;\
1171                 else \
1172                         $(ECHO) "Superuser install, installing config files as $(USER):$(GROUP_T)" ;\
1173                         INSTALL_CONF="$(INSTALL_R) -o $(USER) -g $(GROUP_T)" ;\
1174                         GROUP_T=$(GROUP_T) ;\
1175                 fi ;\
1176         else \
1177                 if [ ! "`id $(USER)`" = "`id`" ] ;then \
1178                         $(ECHO) "** WARNING ** current install user different from configured user!!" ;\
1179                         $(ECHO) "Edit may fail." ;\
1180                 fi ;\
1181                 INSTALL_CONF="$(INSTALL_R)" ;\
1182         fi ;\
1183         $(ECHO) Installing configuration files to $(CONF_DEST);\
1184         for i in $(CONFIGS); do \
1185                 if [ -s "$(CONF_DEST)/$$i" ] ; then \
1186                         $(ECHO) Installing $$i as $$i.new ;\
1187                         $(INSTALL) $$INSTALL_CONF $$i $(CONF_DEST)/$$i.new || exit 1;\
1188                         NEW=1;\
1189                 else \
1190                         $(INSTALL) $$INSTALL_CONF $$i $(CONF_DEST) || exit 1;\
1191                 fi ;\
1192         done ;\
1193         if [ -n "$$NEW" ]; then \
1194                 $(CHMOD) $(RWD_MODE) $(CONF_DEST)/*.new || exit 1 ;\
1195                 $(ECHO) "Warning: Older config files are preserved. Check new versions for changes!" ;\
1196         fi ;\
1197         [ ! -f $(LOG_DEST)/logfile ] && $(ECHO) Creating logfiles in $(LOG_DEST) || \
1198                 $(ECHO) Checking logfiles in $(LOG_DEST) ;\
1199                 $(TOUCH) $(LOG_DEST)/logfile $(LOG_DEST)/jarfile || exit 1 ;\
1200         if [ x$$USER != x ]; then \
1201                 $(CHOWN) $$USER $(LOG_DEST)/logfile $(LOG_DEST)/jarfile || \
1202                 $(ECHO) "** WARNING ** current install user different from configured user. Logging may fail!!" ;\
1203         fi ;\
1204         if [ x$$GROUP_T != x ]; then \
1205                 $(CHGRP) $$GROUP_T $(LOG_DEST)/logfile $(LOG_DEST)/jarfile || \
1206                 $(ECHO) "** WARNING ** current install user different from configured user. Logging may fail!!" ;\
1207         fi ;\
1208         $(CHMOD) $(RWD_MODE) $(LOG_DEST)/logfile $(LOG_DEST)/jarfile || exit 1 ;\
1209         if [ "$(prefix)" = "/usr/local" ] || [ "$(prefix)" = "/usr" ]; then \
1210                 if [ -f /etc/slackware-version ] && [ -d /etc/rc.d/ ] && [ -w /etc/rc.d/ ] ; then \
1211                $(SED) 's+%PROGRAM%+$(PROGRAM)+' slackware/rc.privoxy.orig | \
1212                $(SED) 's+%SBIN_DEST%+$(SBIN_DEST)+' | \
1213                $(SED) 's+%CONF_DEST%+$(CONF_DEST)+' | \
1214                $(SED) 's+%USER%+$$USER+' | \
1215                $(SED) 's+%GROUP%+$(GROUP_T)+' >slackware/rc.privoxy ;\
1216                         $(INSTALL) $(INSTALL_P) slackware/rc.privoxy /etc/rc.d/ ;\
1217                $(ECHO) "Installing for Slackware." ;\
1218                $(ECHO) "Dont forget to add the rc.privoxy to rc.local if you want it started at every boot" ;\
1219                 elif [ -f /etc/redhat-release ] && [ -d /etc/rc.d/init.d/ ] && [ -w /etc/rc.d/init.d/ ] ; then \
1220                $(ECHO) "Installing init script to /etc/rc.d/init.d/privoxy" ;\
1221                         $(SED) 's,^PRIVOXY_BIN=.*,PRIVOXY_BIN="/usr/local/sbin/$(PROGRAM)",' privoxy.init |\
1222                         $(SED) 's,^PRIVOXY_CONF=.*,PRIVOXY_CONF="$(CONF_DEST)/config",' |\
1223                         $(SED) "s,^PRIVOXY_USER=.*,PRIVOXY_USER=$$USER," > init.tmp ;\
1224                         $(INSTALL) $(INSTALL_P) init.tmp /etc/rc.d/init.d/privoxy && $(RM) init.tmp;\
1225                         $(MKDIR) /etc/logrotate.d/ ;\
1226                         $(ECHO) "Installing logrotate script to /etc/logrotate.d/" ;\
1227                         $(INSTALL) -m 0644 privoxy.logrotate /etc/logrotate.d/privoxy ;\
1228                 elif [ -d /etc/init.d ] && [ -w /etc/init.d ] ; then \
1229                         $(ECHO) "Installing generic init script to /etc/init.d/privoxy" ;\
1230                         $(ECHO) "Please check that the PATHs are correct, and edit if needed." ;\
1231                         $(INSTALL) $(INSTALL_P) privoxy-generic.init /etc/init.d/privoxy ;\
1232                 fi ;\
1233         else \
1234                 $(ECHO) "No init script installed, install it manually if needed" ;\
1235         fi
1236         @# mmmmm, good.
1237         @$(ECHO) "$(PROGRAM_V) installation succeeded!"
1238         @$(ECHO) "The Privoxy configuration files have been installed in $(CONF_DEST)"
1239
1240 # rmdir is used as a precaution since it will not remove non-empty
1241 # directories. RH init script creates lock file and pid file.
1242 uninstall: CONF_DEST LOG_DEST PID_DEST check_doc
1243         @$(ECHO) Starting Privoxy uninstallation
1244         @# KILL privoxy if running
1245         -@if [ -f /etc/redhat-release ] && [ -x /etc/rc.d/init.d/privoxy ]; then \
1246                 /etc/rc.d/init.d/privoxy stop >/dev/null 2>/dev/null ;\
1247                 chkconfig --del $(PROGRAM) 2>/dev/null;\
1248         fi
1249         -@test -f $(PID_DEST)/privoxy.pid && $(ECHO) Stopping $(PROGRAM) &&\
1250          $(KILL) `$(CAT) $(PID_DEST)/privoxy.pid` || :
1251         -@test -f /var/run/privoxy.pid && $(ECHO) Stopping $(PROGRAM) &&\
1252           $(KILL) `$(CAT) /var/run/privoxy.pid ` || :
1253
1254         @# Program binary
1255         @$(ECHO) Removing $(PROGRAM) binary
1256         $(RM) $(SBIN_DEST)/$(PROGRAM) $(SBIN_DEST)/$(PROGRAM)~
1257
1258         @# config files and dir, and maybe old install backups
1259         -@if [ -d $(CONF_DEST) ]; then \
1260                 $(ECHO) Saving $(PROGRAM) config files to /tmp/$(PROGRAM)-save ;\
1261                 $(MKDIR) /tmp/$(PROGRAM)-save ;\
1262                 cd $(CONF_DEST) ;\
1263                 for i in $(CONFIGS); do \
1264                         [ -f $$i ] && $(CP) $$i /tmp/$(PROGRAM)-save ;\
1265                 done ;\
1266         fi
1267         @$(ECHO) Removing $(PROGRAM) config files
1268         -@for i in $(CONFIGS); do \
1269                 test -f $(CONF_DEST)/$$i && $(ECHO) Removing $$i ;\
1270                 $(RM) $(CONF_DEST)/$$i $(CONF_DEST)/$$i~ $(CONF_DEST)/$$i.new ;\
1271         done
1272         -@test -d $(CONF_DEST)/templates && $(RM) -r $(CONF_DEST)/templates &&\
1273         $(ECHO) "Removing $(CONF_DEST)/templates/*"
1274
1275         @# man page and docs
1276         @$(ECHO) Removing $(PROGRAM) docs
1277         -$(RM) $(MAN_DEST)/privoxy.1*
1278         -$(RM) -r $(DOC_DEST) || $(RM) -r $(prefix)/doc/privoxy
1279
1280         @# Log and jarfile and pidfile
1281         @$(ECHO) Removing $(PROGRAM) logs
1282         -$(RM) $(LOG_DEST)/logfile $(PID_DEST)/privoxy.pid $(LOG_DEST)/jarfile
1283
1284         @# Final clean up of unused directories. Special handling of CONF and LOG
1285      # destinations.
1286         @$(ECHO) Removing $(PROGRAM) directories
1287         @for i in $(LOG_DEST) $(CONF_DEST); do \
1288                 if test -d $$i; then \
1289                         $(ECHO) Removing $$i ;\
1290                         $(RMDIR) $$i || $(ECHO) "$$i is not empty, not removed" ;\
1291                 fi;\
1292         done
1293         @if [  ! "$(prefix)" = "/usr/local" ] ;then \
1294                 for i in $(MAN_DEST) $(MAN_DIR) $(SHARE_DEST)/doc $(SHARE_DEST) $(SBIN_DEST); do \
1295                         if test -d $$i; then \
1296                                 $(ECHO) Removing $$i ;\
1297                                 $(RMDIR) $$i || $(ECHO) "$$i is not empty, not removed" ;\
1298                         fi;\
1299                 done;\
1300                 if test $(LOG_DEST) != /var/log/privoxy && test -d $(prefix)/var/log; then \
1301                         $(ECHO) Removing $(prefix)/var/log ;\
1302                         $(RMDIR) $(prefix)/var/log || $(ECHO) "$(prefix)/var/log is not empty, not removed";\
1303                 fi ;\
1304                 if test $(PID_DEST) != /var/run && test -d $(prefix)/var/run; then \
1305                         $(ECHO) Removing $(prefix)/var/run ;\
1306                         $(RMDIR) $(prefix)/var/run || $(ECHO) "$(prefix)/var/run is not empty, not removed";\
1307                 fi ;\
1308                 if test $(prefix)/var != /var && test -d $(prefix)/var; then \
1309                         $(ECHO) Removing $(prefix)/var ;\
1310                         $(RMDIR) $(prefix)/var || $(ECHO) "$(prefix)/var is not empty, not removed" ;\
1311                 fi ;\
1312                 if test $(prefix) != / && test $(prefix) != /usr && test -d $(prefix); then \
1313                         $(ECHO) Removing $(prefix) ;\
1314                         $(ECHO) Removing installation directory $(prefix) ;\
1315                         $(RMDIR) $(prefix) || $(ECHO) "$(prefix) is not empty, not removed" ;\
1316                 fi;\
1317         fi
1318
1319         @# init scripts and logrotate
1320         @if [ "$(prefix)" = "/usr/local" ] || [ "$(prefix)" = "/usr" ]; then \
1321                 $(ECHO) Removing $(PROGRAM) init script ;\
1322                 if [ -f /etc/slackware-version ] && [ -d /etc/rc.d/ ]  && [ -w /etc/rc.d/ ] ; then \
1323                         $(RM) /etc/rc.d/rc.privoxy ;\
1324                 elif [ -f /etc/redhat-release ] && [ -d /etc/rc.d/init.d/ ]  && [ -w /etc/rc.d/init.d/ ] ; then \
1325                         $(RM) /etc/rc.d/init.d/privoxy /etc/logrotate.d/privoxy;\
1326                 elif [ -d /etc/init.d ] && [ -w /etc/init.d ] ; then \
1327                         $(RM) /etc/init.d/privoxy ;\
1328                 else \
1329                         $(ECHO) "Unable to remove privoxy init script, not installed or permission denied" ;\
1330                 fi ;\
1331         fi
1332         @$(ECHO) Privoxy uninstalled, bye
1333
1334 coffee:
1335          @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,\
1336                   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,\
1337                   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,\
1338                   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,\
1339                   193,51,228,11,1,0,0);'|zcat
1340
1341 #############################################################################
1342
1343 ## Local Variables:
1344 ## tab-width: 3
1345 ## end:
1346
1347 # $Log: GNUmakefile.in,v $
1348 # Revision 1.141  2006/08/12 03:54:37  david__schmidt
1349 # Windows service integration
1350 #
1351 # Revision 1.140  2006/07/18 14:48:45  david__schmidt
1352 # Reorganizing the repository: swapping out what was HEAD (the old 3.1 branch)
1353 # with what was really the latest development (the v_3_0_branch branch)
1354 #
1355 # Revision 1.104.2.28  2004/06/10 17:06:05  hal9
1356 # Fix bug #959617, by moving TMPDIR var to create-snapshot target, which is the
1357 # only place it is used.
1358 #
1359 # Revision 1.104.2.27  2004/02/07 16:11:10  oes
1360 # Make clobber remove the autom4te.cache dir.
1361 # Closes BR #889300
1362 #
1363 # Revision 1.104.2.26  2004/01/31 16:32:25  oes
1364 # Adding a check for an htmldoc variant from the debian diff
1365 #
1366 # Revision 1.104.2.25  2004/01/31 01:15:33  oes
1367 # Fixed a typo; updated copyright notice
1368 #
1369 # Revision 1.104.2.24  2003/12/03 10:30:02  oes
1370 # - Added new dependency: actions.c -> ssplit.h
1371 # - Excluded PDF docs from src tarball
1372 #
1373 # Revision 1.104.2.23  2003/04/20 17:28:52  hal9
1374 # Strip trailing spaces from config-file generation, bug #724596.
1375 #
1376 # Revision 1.104.2.22  2003/03/28 03:32:01  hal9
1377 # Minor changes for Privoxy home page:
1378 #  - Handle &copy; more sanely
1379 #  - include link to announce.txt
1380 # Also, disable 'make announce' target.
1381 #
1382 # Revision 1.104.2.21  2002/11/04 07:04:03  hal9
1383 # Catch up with main trunk install/uninstall. Quiet output, etc.
1384 #
1385 # Revision 1.104.2.20  2002/10/25 02:44:22  hal9
1386 # Port of make install, etc from main trunk. Needs testing! Add Slackware
1387 # support, and other related changes. Update related docs.
1388 #
1389 # Revision 1.104.2.19  2002/09/26 22:50:02  hal9
1390 # New user-manual examples in config-file are getting wrapped. Add warning.
1391 #
1392 # Revision 1.104.2.18  2002/08/23 12:22:40  oes
1393 # Added warning to broken install target
1394 #
1395 # Revision 1.104.2.17  2002/08/16 03:19:34  hal9
1396 # More (minor) cleanup of html before pdf processing to make some relative
1397 # links work as pdf -> pdf. Upload pdf as zip archive now.
1398 #
1399 # Revision 1.104.2.16  2002/08/14 16:43:27  hal9
1400 # Added pdf docs to make webserver target.
1401 #
1402 # Revision 1.104.2.15  2002/08/11 20:02:41  hal9
1403 # New targets for man page (make man) and pdf (make dok-pdf) targets.
1404 #
1405 # Revision 1.104.2.14  2002/08/10 11:19:37  oes
1406 # - Make -Ipcre (again) conditional on STATIC_PCRE
1407 # - $(RPMBUILD) -> $(RPM) for SuSE
1408 # - Add dependency: pcrs.o deps on config.h
1409 #
1410 # Revision 1.104.2.13  2002/08/07 15:13:54  hal9
1411 # Remove pdf2 target, and make it dok-shtml (single page html for pdf
1412 # conversion).
1413 #
1414 # Revision 1.104.2.12  2002/08/06 11:29:36  oes
1415 # Fixed detection/inclusion of pcre.h, which is in a pcre subdir on RH
1416 #
1417 # Revision 1.104.2.11  2002/07/30 19:38:11  hal9
1418 # Add redhat-test target for testing purposes only. Fix RPM_PACKAGEV to what
1419 # *I think* it was supposed to be (was breaking upload targets since it was
1420 # set to RPM_VERSION).
1421 #
1422 # Revision 1.104.2.10  2002/07/27 22:56:53  kick_
1423 # cleanups of the redhat-srpm target
1424 #
1425 # Revision 1.104.2.9  2002/07/26 15:17:02  oes
1426 # - Added generation of default.action from defaul.action.master
1427 # - Deleted obsolete re_filterfile.txt generation
1428 #
1429 # Revision 1.104.2.8  2002/07/12 10:04:32  kick_
1430 # added helper targets to the makefile. They shouldn't break anything, but
1431 # make my life a lot easier.
1432 #
1433 # The new rpm has been splitted into two parts, one for package installation/
1434 # removal, one for package building.
1435 # Therefore rpm -ta isn't a valid command anymore and needs to be replaced
1436 # by rpmbuild -ta  (this is backwards compatible)
1437 #
1438 # Revision 1.104.2.7  2002/06/07 00:23:47  hal9
1439 # Fixing a quirk of man2html (on my system) that pulls punctuation into URLs,
1440 # thus breaking them completely.
1441 #
1442 # Revision 1.104.2.6  2002/06/02 03:26:25  hal9
1443 # Update CONFIG_FILES (ie update basic.action, etc), and also DOC_FILES (exclude
1444 # index.html and team/index.html)
1445 #
1446 # Revision 1.104.2.5  2002/05/30 15:35:01  hal9
1447 # This is more cleanup on the make config-file target. Most issues for
1448 # automatic generation are taken care of. There are still some problems
1449 # that require hand editing. Namely, some of the examples that are > 80 chars.
1450 #
1451 # Revision 1.104.2.4  2002/05/29 02:12:17  hal9
1452 # Ooops...forgot about perl -pi cygwin problem. Add -pi.bak. Also, the
1453 # new target is 'make config-file', _not_ make config.
1454 #
1455 # Revision 1.104.2.3  2002/05/29 02:05:48  hal9
1456 # 'make config' target added (WIP) for future generation of config file from
1457 # text in u-m so the two are in sync. New generated config, which requires
1458 # some hand editing for the time being.
1459 #
1460 # Revision 1.104.2.2  2002/05/28 02:32:55  hal9
1461 # New target 'make dok-index' for privoxy-index.html. Also, fixed *.bak files
1462 # not being cleaned up in doc/webserver.
1463 #
1464 # Revision 1.104.2.1  2002/05/26 17:19:34  hal9
1465 # Remove Table of Contents from readme with oes's dsl trick.
1466 #
1467 # Revision 1.104  2002/05/24 00:03:49  oes
1468 # Use p_doc.css for the Homepage for consistency
1469 #
1470 # Revision 1.103  2002/05/23 23:19:00  oes
1471 # Use dsl without TOC for the homepage
1472 #
1473 # Revision 1.102  2002/05/16 01:20:17  hal9
1474 # make announce target added.
1475 #
1476 # Revision 1.101  2002/05/15 12:28:46  oes
1477 # Trying to keep Hal happy :)
1478 #
1479 # Revision 1.100  2002/05/08 13:48:18  hal9
1480 # Ooops, that trashed JB v2.0.2 comment. Fixed.
1481 #
1482 # Revision 1.99  2002/05/08 13:42:07  hal9
1483 # This fixes the numbering problem on index.html in contact info section (.1.). Using
1484 # perl, since its way too convoluted to try to fix proper with docbook.
1485 #
1486 # Revision 1.98  2002/05/03 14:33:06  oes
1487 # Replaced ldp(OK).dsl handling with generation via autoconf; handle all file exeptions to src tarball via find
1488 #
1489 # Revision 1.97  2002/04/27 20:27:43  swa
1490 # no longer needed due to new
1491 # PACKAGE_VERSION process
1492 #
1493 # Revision 1.96  2002/04/27 17:44:32  morcego
1494 # - Correcting typo in my name (Rodrigo, not Rodgrigo) :-)
1495 # - Using the RM macro everywhere rm is called (either we use, or don't)
1496 # - Same for RPM
1497 #
1498 # Revision 1.95  2002/04/27 15:37:25  swa
1499 # replacing directory in document creation process
1500 # no longer necessary.
1501 #
1502 # Revision 1.94  2002/04/27 08:23:29  swa
1503 # pdf process reviewed and cleaned up
1504 #
1505 # Revision 1.93  2002/04/27 04:55:53  morcego
1506 # privoxy-cl.spec now gets removed by clobber target
1507 #
1508 # Revision 1.92  2002/04/27 04:53:40  morcego
1509 # Adding --exclude "PACKAGERS" to every tar command that applies (not for
1510 #   webserver target)
1511 #
1512 # Revision 1.91  2002/04/27 04:44:51  morcego
1513 # GNUmakefile.in: The tarball created on redhat-dist and suse-dist now ignore
1514 #   the PACKAGERS file, as well privoxy-cl.spec (in case it was created)
1515 # GNUmakefile.in: New targets -> conectiva-spec, conectiva-dist and
1516 #   conectiva-upload
1517 # genclspec.sh  : New file to generate, from privoxy-rh.spec, a specfile
1518 #   for Conectiva Linux
1519 #
1520 # Revision 1.90  2002/04/26 17:46:53  swa
1521 # be consistent
1522 #
1523 # Revision 1.89  2002/04/26 17:20:54  swa
1524 # just produce single html files to proces them later with Destiller or somesuch. looks prettier.
1525 #
1526 # Revision 1.88  2002/04/25 19:13:57  morcego
1527 # Removed RPM release number declaration on configure.in
1528 # Changed makefile to use given value for RPM_PACKAGEV when on uploading
1529 # targets (will produce an error, explaining who to do it, if no value
1530 # if provided).
1531 #
1532 # Revision 1.87  2002/04/23 14:10:59  swa
1533 # now create pdf documents
1534 #
1535 # Revision 1.86  2002/04/15 04:30:27  hal9
1536 # Missed two -pi.bak's on perl/cygwin problem.
1537 #
1538 # Revision 1.85  2002/04/14 01:05:34  hal9
1539 # Revert dok-webserver change for SF logo.
1540 #
1541 # Revision 1.84  2002/04/13 22:43:25  hal9
1542 # -Fix dok-webserver for SF logo (more perl).
1543 # -Change all perl -pi to perl -pi.bak for Cygwin problem.
1544 #
1545 # Revision 1.83  2002/04/12 09:39:25  oes
1546 # Excluding yet more files from tarball; making dist warning yet more scary
1547 #
1548 # Revision 1.82  2002/04/11 21:07:11  oes
1549 # Excluding more files from tarball build
1550 #
1551 # Revision 1.81  2002/04/11 14:40:27  oes
1552 # Fixed typo -- Thanks, Moritz!
1553 #
1554 # Revision 1.80  2002/04/11 12:50:00  oes
1555 # Fixed tarball-dist target
1556 #
1557 # Revision 1.79  2002/04/11 06:49:28  oes
1558 # 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
1559 #
1560 # Revision 1.78  2002/04/09 13:37:11  sarantis
1561 # fix tar options typo
1562 #
1563 # Revision 1.77  2002/04/09 13:28:53  swa
1564 # build suse and gen-dist with html docs
1565 #
1566 # Revision 1.76  2002/04/08 22:43:41  oes
1567 # Fix: Include dotfiles in fixing webserver permissions
1568 #
1569 # Revision 1.75  2002/04/08 22:14:59  oes
1570 # Silencing tar warnings in the web* targets
1571 #
1572 # Revision 1.74  2002/04/08 15:22:44  hal9
1573 # This has finishing touches for dok building. Should be ready to go.
1574 # -The main doc build is now 'make dok', should work on Redhat too.
1575 # -Removed man page from main doc build. It is built separately due to
1576 #  perl scripts that most aren't likely to have.
1577 #
1578 # Revision 1.73  2002/04/08 14:03:24  oes
1579 # oes for al: Fix install target
1580 #
1581 # Revision 1.72  2002/04/08 13:42:11  oes
1582 # Added safety check to *-dist targets; fixed permissions for feedback logfile
1583 #
1584 # Revision 1.71  2002/04/07 20:32:03  hal9
1585 # -Add meta data kludge for make dok-webserver via $(PERL).
1586 # -Add subdirs for 'make dok-release'.
1587 #
1588 # Revision 1.70  2002/04/07 08:59:40  swa
1589 # generated files. do NOT edit.
1590 # fixed directory bug in makefile.
1591 #
1592 # Revision 1.69  2002/04/07 08:10:47  swa
1593 # create some of the webserver docs
1594 # automatically (in particular if
1595 # those docs recycle other documentation
1596 # fragments). Now committed webserver's
1597 # index file.
1598 #
1599 # Revision 1.68  2002/04/07 07:58:11  swa
1600 # create some of the webserver docs
1601 # automatically (in particular if
1602 # those docs recycle other documentation
1603 # fragments)
1604 #
1605 # Revision 1.67  2002/04/07 05:31:42  hal9
1606 # Add 'dok-release' target:
1607 # -Set doc entities to VERSION and CODE_STATUS during make.
1608 # -Set doc conditional content flags (stable vs non-stable).
1609 # A separate target for the time being but needs to be incorporated into
1610 # dok build at some point.
1611 # -Filter out a spurious ^G from new man page > html converion in man2html.
1612 #
1613 # Revision 1.66  2002/04/06 20:28:21  jongfoster
1614 # Prettifying groff2html.
1615 # Using GNU Make's conditional makefile feature rather than shell "if"s.
1616 # (The shell "if"s were hiding errors)
1617 # "perl" -> "$(PERL)"
1618 # Spaces->tabs in a couple of places.
1619 #
1620 # Revision 1.65  2002/04/06 05:16:39  hal9
1621 # -Add 'authors' and 'man' targets for AUTHORS and man-page (WIP).
1622 # -Both of these will soon be generated files.
1623 #
1624 # Revision 1.64  2002/04/04 22:14:51  oes
1625 # No longer rely on find honoring -iname
1626 #
1627 # Revision 1.63  2002/04/04 21:06:22  swa
1628 # cosmetics.
1629 #
1630 # Revision 1.62  2002/04/04 20:49:50  swa
1631 # attempt to consolidate the
1632 # different dokbook versions.
1633 #
1634 # Revision 1.61  2002/04/04 19:18:21  swa
1635 # readme was leftover directory. use w3m instead
1636 # of lynx to be consistent among developers. use
1637 # consistent target naming.
1638 #
1639 # Revision 1.60  2002/04/04 12:25:41  oes
1640 # Tidy webserver upload w/o *~ files, CVS dirs and logfiles and with proper dir and file permissions
1641 #
1642 # Revision 1.59  2002/04/04 08:32:45  swa
1643 # wrong name for tarball-dist target. further fixed content of tarball dist
1644 #
1645 # Revision 1.58  2002/04/04 06:32:58  hal9
1646 # New dok targets for make readme.
1647 #
1648 # Revision 1.57  2002/04/04 00:36:36  gliptak
1649 # always use pcre for matching
1650 #
1651 # Revision 1.56  2002/04/03 22:28:03  gliptak
1652 # Removed references to gnu_regex
1653 #
1654 # Revision 1.55  2002/04/03 19:54:29  swa
1655 # freebsd tested to work. attempt to move tarball dist target forward
1656 #
1657 # Revision 1.54  2002/04/03 14:54:07  oes
1658 # Standard clean and clobber semantics II
1659 #
1660 # Revision 1.53  2002/04/03 14:19:16  oes
1661 # Standard clean and clobber semantics
1662 #
1663 # Revision 1.52  2002/04/03 02:56:18  hal9
1664 # Revert previous FAQ numbering kludge.
1665 #
1666 # Revision 1.51  2002/04/02 13:03:56  oes
1667 # Added fix for webserver permissions
1668 #
1669 # Revision 1.50  2002/04/02 03:46:24  hal9
1670 # Rewrite ldpOK.dsl so that sections are NOT numbered on FAQ, in an effort
1671 # to make the Table of Contents not so 'busy' looking. SuSE needs testing :)
1672 #
1673 # Revision 1.49  2002/03/30 22:20:12  swa
1674 # cd didn't work. neither did find.
1675 #
1676 # Revision 1.48  2002/03/30 19:04:06  swa
1677 # people release differently. no good.
1678 # I want to make parts of the docs only.
1679 #
1680 # Revision 1.47  2002/03/30 09:05:21  swa
1681 # better packaging. better rpm building.
1682 # tar failed on sun (no exclude there).
1683 #
1684 # Revision 1.46  2002/03/29 20:09:01  swa
1685 # al's patch
1686 #
1687 # Revision 1.45  2002/03/29 19:45:45  swa
1688 # for lazy swa
1689 #
1690 # Revision 1.44  2002/03/29 17:42:44  gliptak
1691 # Correcting for Solaris tar limitations
1692 #
1693 # Revision 1.43  2002/03/29 07:40:03  swa
1694 # fixed make webserver. doh
1695 #
1696 # Revision 1.42  2002/03/29 06:59:04  swa
1697 # other users could not modify files on webserver
1698 #
1699 # Revision 1.41  2002/03/28 20:43:00  swa
1700 # set make correctly
1701 #
1702 # Revision 1.40  2002/03/28 04:22:44  hal9
1703 # More on man2html stuff.
1704 #
1705 # Revision 1.39  2002/03/28 01:04:14  hal9
1706 # More man2html stuff for docs.
1707 #
1708 # Revision 1.38  2002/03/27 16:02:30  swa
1709 # have a generic target
1710 #
1711 # Revision 1.37  2002/03/27 15:30:26  swa
1712 # have a consistent appearance
1713 #
1714 # Revision 1.36  2002/03/27 14:58:08  swa
1715 # can be used by mutilple targets
1716 #
1717 # Revision 1.35  2002/03/27 14:53:19  swa
1718 # added solaris-dist
1719 #
1720 # Revision 1.34  2002/03/27 10:30:11  swa
1721 # we want a html man file on the webserver
1722 #
1723 # Revision 1.33  2002/03/27 03:05:35  hal9
1724 # Added man2html target for docs (redhat-dok only for now)
1725 #
1726 # Revision 1.32  2002/03/26 22:29:54  swa
1727 # we have a new homepage!
1728 #
1729 # Revision 1.31  2002/03/26 14:00:18  swa
1730 # fixed make tarball, tarball-dist, tarball-clean
1731 #
1732 # Revision 1.30  2002/03/25 12:52:25  swa
1733 # new targets
1734 #
1735 # Revision 1.29  2002/03/24 17:03:55  jongfoster
1736 # Name change
1737 #
1738 # Revision 1.28  2002/03/24 16:19:48  swa
1739 # configure needs to be generated.
1740 #
1741 # Revision 1.27  2002/03/24 16:13:57  swa
1742 # generated files are a nono in cvs
1743 #
1744 # Revision 1.26  2002/03/24 15:36:02  swa
1745 # did not build.
1746 #
1747 # Revision 1.25  2002/03/24 14:31:08  swa
1748 # remove more crappy files. set RPM
1749 # release version correctly.
1750 #
1751 # Revision 1.24  2002/03/24 14:19:55  swa
1752 # set rpm package release in configure.in. nowhere else.
1753 #
1754 # Revision 1.23  2002/03/24 13:06:49  swa
1755 # suse-clean now runs fine
1756 #
1757 # Revision 1.22  2002/03/24 12:56:21  swa
1758 # name change related issues.
1759 #
1760 # Revision 1.21  2002/03/24 12:43:57  swa
1761 # name change
1762 #
1763 # Revision 1.20  2002/03/24 11:39:17  jongfoster
1764 # Renaming config files
1765 #
1766 # Revision 1.19  2002/03/22 20:53:03  morcego
1767 # - Ongoing process to change name to JunkbusterNG
1768 # - configure/configure.in: no change needed
1769 # - GNUmakefile.in:
1770 #         - TAR_ARCH = /tmp/JunkbusterNG-$(RPM_VERSION).tar.gz
1771 #         - PROGRAM    = jbng@EXEEXT@
1772 #         - rh-spec now references as junkbusterng-rh.spec
1773 #         - redhat-upload: references changed to junkbusterng-* (package names)
1774 #         - tarball-dist: references changed to JunkbusterNG-distribution-*
1775 #         - tarball-src: now JunkbusterNG-*
1776 #         - install: initscript now junkbusterng.init and junkbusterng (when
1777 #                    installed)
1778 # - junkbuster-rh.spec: renamed to junkbusterng-rh.spec
1779 # - junkbusterng.spec:
1780 #         - References to the expression ijb where changed where possible
1781 #         - New package name: junkbusterng (all in lower case, acording to
1782 #           the LSB recomendation)
1783 #         - Version changed to: 2.9.13
1784 #         - Release: 1
1785 #         - Added: junkbuster to obsoletes and conflicts (Not sure this is
1786 #           right. If it obsoletes, why conflict ? Have to check it later)
1787 #         - Summary changed: Stefan, please check and aprove it
1788 #         - Changes description to use the new name
1789 #         - Sed string was NOT changed. Have to wait to the manpage to
1790 #           change first
1791 #         - Keeping the user junkbuster for now. It will require some aditional
1792 #           changes on the script (scheduled for the next specfile release)
1793 #         - Added post entry to move the old logfile to the new log directory
1794 #         - Removing "chkconfig --add" entry (not good to have it automaticaly
1795 #           added to the startup list).
1796 #         - Added preun section to stop the service with the old name, as well
1797 #           as remove it from the startup list
1798 #         - Removed the chkconfig --del entry from the conditional block on
1799 #           the preun scriptlet (now handled on the %files section)
1800 # - junkbuster.init: renamed to junkbusterng.init
1801 # - junkbusterng.init:
1802 #         - Changed JB_BIN to jbng
1803 #         - Created JB_OBIN with the old value of JB_BIN (junkbuster), to
1804 #           be used where necessary (config dir)
1805 #
1806 # Aditional notes:
1807 # - The config directory is /etc/junkbuster yet. Have to change it on the
1808 # specfile, after it is changes on the code
1809 # - The only files that got renamed on the cvs tree were the rh specfile and
1810 # the init file. Some file references got changes on the makefile and on the
1811 # rh-spec (as listed above)
1812 #
1813 # Revision 1.18  2002/03/21 23:00:00  swa
1814 # want to autogenerate stuff.
1815 #
1816 # Revision 1.17  2002/03/19 19:30:04  morcego
1817 # - Fixing stylesheet checking on configure. If it is found, no further checks
1818 #   should be done
1819 #
1820 # - configure will now check for db2html or docbook2html (should work now
1821 #   on SuSe without the docbktls package)
1822 #
1823 # Revision 1.16  2002/03/14 22:32:32  hal9
1824 # Bumped the RPM version.
1825 #
1826 # Revision 1.15  2002/03/08 20:00:28  swa
1827 # some leftovers.
1828 #
1829 # Revision 1.14  2002/03/07 18:25:56  swa
1830 # synced redhat and suse build process
1831 #
1832 # Revision 1.13  2002/03/07 17:17:56  oes
1833 # (Hopefully) fixed for older make versions
1834 #
1835 # Revision 1.12  2002/03/07 15:28:27  swa
1836 # more informative
1837 #
1838 # Revision 1.11  2002/03/06 14:33:18  sarantis
1839 # Use proper temp file, not "abc".
1840 #
1841 # Revision 1.10  2002/03/06 14:19:35  sarantis
1842 # Cleanup PID_FILE_PATH from redhat-dist target
1843 #
1844 # Revision 1.9  2002/03/05 17:31:11  morcego
1845 # Search for docbook.dsl. Should solve portability problems for SuSe.
1846 #
1847 # Revision 1.8  2002/03/05 14:07:42  morcego
1848 # configure now detects rpm topdir, and change GNUmakefile acordingly
1849 #    (based on sugestion by Sarantis Paskalis)
1850 #
1851 # Revision 1.7  2002/03/05 13:43:28  morcego
1852 # Checking for text browser, so redhat-dok can work.
1853 #
1854 # Revision 1.6  2002/03/05 13:10:51  morcego
1855 # Changes to implement redhat-dok (Hal Burgiss)
1856 # Changes to make it work on other distros and out-of-the-shelf configurations
1857 #
1858 # Revision 1.5  2002/02/27 15:30:39  hal9
1859 # Reset $(RPM_PACKAGEV) to 1 (was 2)
1860 #
1861 # Revision 1.4  2002/01/17 21:44:04  jongfoster
1862 # Adding urlmatch.[ch]
1863 #
1864 # Revision 1.3  2002/01/04 15:26:08  oes
1865 # Added tarball-src target
1866 #
1867 # Revision 1.2  2001/12/30 14:07:31  steudten
1868 # - Add signal handling (unix)
1869 # - Add SIGHUP handler (unix)
1870 # - Add creation of pidfile (unix)
1871 # - Add action 'top' in rc file (RH)
1872 # - Add entry 'SIGNALS' to manpage
1873 # - Add exit message to logfile (unix)
1874 #
1875 # Revision 1.1  2001/12/01 11:22:57  jongfoster
1876 # Renaming Makefile.in to GNUmakefile.in so that non-GNU versions of
1877 # make break in a more obvious way.
1878 # Adding .PHONY section.
1879 #
1880 # Revision 1.40  2001/12/01 00:24:11  jongfoster
1881 # Renaming various config files
1882 # Fixing CR->CRLF under Win32 (I hope)
1883 #
1884 # Revision 1.39  2001/11/06 12:07:30  steudten
1885 # Add --clean for building rpm in target redhat-dist.
1886 #
1887 # Revision 1.38  2001/11/05 21:35:23  steudten
1888 # Complete rewrite for the 'redhat-dist' target.
1889 # Checks for writeable RPM build directories for calling user.
1890 # So you must not be root, just set the modes to 1777 to
1891 # build a RH package.
1892 # Fix the upload-target to be arch independant.
1893 # Add target for 'solaris-dist' - coming soon.
1894 #
1895 # Revision 1.37  2001/11/01 00:52:04  hal9
1896 # Redhat-upload stuff per Stefan.
1897 #
1898 # Revision 1.36  2001/10/31 19:26:13  swa
1899 # automate process of uploading new releases
1900 # to sf.
1901 #
1902 # Revision 1.35  2001/10/15 22:14:59  joergs
1903 # Removed -O2 and -Wall from AmigaOS-only CFLAGS since they are now in
1904 #  the general CFLAGS already.
1905 #
1906 # Revision 1.34  2001/10/15 18:28:06  steudten
1907 # remove config.cache for target clobber.
1908 # Cleanup make dist for RH and S.u.S.E.
1909 #
1910 # Revision 1.33  2001/10/10 12:43:33  oes
1911 # Added ugly hack to make install target work at least for some setups.
1912 #
1913 # Revision 1.32  2001/10/09 22:38:19  jongfoster
1914 # Correcting actionsfile filename for Win32 INI build
1915 #
1916 # Revision 1.31  2001/09/23 10:13:48  swa
1917 # upload process established. run make webserver and
1918 # the documentation is moved to the webserver. documents
1919 # are now linked correctly.
1920 #
1921 # Revision 1.30  2001/09/19 17:55:49  oes
1922 # Fixed CFLAGS
1923 #
1924 # Revision 1.29  2001/09/16 17:34:27  jongfoster
1925 # Removing showargs.[ch], adding cgi(simple|edit).[ch]
1926 # Replacing $(OBJEXT) with @OBJEXT@ - this seems to be a common source
1927 # of build problems.
1928 #
1929 # Revision 1.28  2001/09/13 15:19:08  swa
1930 # we want text files as well.
1931 #
1932 # Revision 1.27  2001/09/13 13:11:37  steudten
1933 #
1934 # Replace DEBUG_CFLAGS with OTHER_CFLAGS
1935 #
1936 # Revision 1.26  2001/09/12 23:44:54  david__schmidt
1937 # Mac OSX (Darwin) support added.
1938 #
1939 # Revision 1.25  2001/09/12 22:55:45  joergs
1940 # AmigaOS support added.
1941 #
1942 # Revision 1.24  2001/09/12 17:28:59  david__schmidt
1943 #
1944 # OS/2 port: update autoconf'd support for the platform.
1945 #
1946 # Revision 1.23  2001/09/12 16:28:42  swa
1947 # added "make dok" section to generate html pages from
1948 # the sgml source documents. note that the we do not want
1949 # generated stuff in cvs.
1950 #
1951 # Revision 1.22  2001/09/10 16:31:23  swa
1952 # buildroot definition in the specfile fucks up the build
1953 # process under suse. hence I moved it to the "rpm -ta"
1954 # command
1955 #
1956 # Revision 1.21  2001/09/10 11:12:49  oes
1957 # Turning on -Wall
1958 #
1959 # Revision 1.20  2001/08/02 22:04:29  jongfoster
1960 # Removing some remaining references to obsolete w32rulesdlg.[ch]
1961 #
1962 # Revision 1.19  2001/07/30 22:14:03  jongfoster
1963 # Removing obsolete w32rulesdlg.c and w32rulesdlg.h
1964 #
1965 # Revision 1.18  2001/07/29 17:09:17  jongfoster
1966 # Major changes to build system in order to fix these bugs:
1967 # - pthreads under Linux was broken - changed -lpthread to -pthread
1968 # - Compiling in MinGW32 mode under CygWin now correctly detects
1969 #   which shared libraries are available
1970 # - Solaris support (?) (Not tested under Solaris yet)
1971 #
1972 # Revision 1.17  2001/07/28 16:44:54  oes
1973 # Fixed sed LF->CRLF conversion and removed deprecated files
1974 #
1975 # Revision 1.16  2001/07/15 19:45:33  jongfoster
1976 # Added support for linking with POSIX threads library
1977 #
1978 # Revision 1.15  2001/07/13 13:48:07  oes
1979 #  - Moved STATIC #define for pcre to (ac)config.h
1980 #  - Made -Ipcre depandant on static pcre compilation to
1981 #    avoid version conflicts
1982 #  - Included compilation and depandancies for new deanimate.c
1983 #  - Made changes to the pcre/pcreposix/pcrs build process
1984 #    as required by the new library autodetection in
1985 #    configure.in
1986 #
1987 # Revision 1.14  2001/07/01 16:27:44  oes
1988 # Fixed misplaced dependancy
1989 #
1990 # Revision 1.13  2001/06/29 13:18:36  oes
1991 # - added depandancy of filters.o on cgi.h
1992 #
1993 # Revision 1.12  2001/06/12 17:15:56  swa
1994 # fixes, because a clean build on rh6.1 was impossible.
1995 # GZIP confuses make, %configure confuses rpm, etc.
1996 #
1997 # Revision 1.11  2001/06/11 11:26:35  sarantis
1998 # RPM version should be the same as ijbswa version.  The rpm release is
1999 # specified in the specfile.
2000 #
2001 # Revision 1.10  2001/06/07 17:27:45  swa
2002 # added suse build section
2003 #
2004 # Revision 1.9  2001/06/04 18:31:58  swa
2005 # files are now prefixed with either `confdir' or `logdir'.
2006 # `make redhat-dist' replaces both entries confdir and logdir
2007 # with redhat values
2008 #
2009 # Revision 1.8  2001/06/04 10:44:57  swa
2010 # `make redhatr-dist' now works. Except for the paths
2011 # in the config file.
2012 #
2013 # Revision 1.7  2001/06/03 17:09:09  swa
2014 # swa for oes: reversed my earlier change
2015 #
2016 # Revision 1.6  2001/06/03 17:07:27  swa
2017 # swa for oes
2018 #
2019 # Revision 1.5  2001/06/03 13:57:26  swa
2020 # compile cgi.c (for andreas' GUI)
2021 #
2022 # Revision 1.4  2001/05/31 21:18:45  jongfoster
2023 # Added files actions.[ch], actionlist.h, list.[ch] to Makefile
2024 #
2025 # Revision 1.3  2001/05/29 20:02:48  joergs
2026 # Changes for AmigaOS added.
2027 #
2028 # Revision 1.2  2001/05/17 22:23:23  oes
2029 #  - Added auto-generation of CRLFs for Win32 config files
2030 #  - Added comment-prefix to all Win32-only options in the config file
2031 #    and provided auto stripping of this prefix for the Win32 platform by make
2032 #
2033 # Revision 1.1.1.1  2001/05/15 13:59:00  oes
2034 # Initial import of version 2.9.3 source tree
2035 #
2036 #