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