summaryrefslogtreecommitdiff
path: root/www/apache21/files/patch-Makefile.in
blob: 1ce27f5cdf558fc91d9bde6c4950481c71672ec3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--- Makefile.in.orig	Sat Jun 15 18:41:03 2002
+++ Makefile.in	Tue Jun 18 22:37:19 2002
@@ -31,12 +31,14 @@
 	@test -d $(DESTDIR)$(sysconfdir) || $(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir)
 	@cd $(top_srcdir)/docs/conf; \
 	for i in mime.types magic; do \
-		$(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir); \
+		test -f $(DESTDIR)$(sysconfdir)/$$i || $(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir); \
+		cp -f $$i $$i.default; \
+		$(INSTALL_DATA) $$i.default $(DESTDIR)$(sysconfdir); \
 	done; \
 	for j in $(top_srcdir)/docs/conf $(top_builddir)/docs/conf ; do \
 		cd $$j ; \
 	for i in *-std*.conf ssl.conf; do \
-		[ -f $$i ] || continue; \
+		[ -f `echo "$$i"|sed 's,\.in$$,_nonex,g'` ] || continue; \
 		( \
 			n_lm=`awk 'BEGIN {n=0} /@@LoadModule@@/ {n+=1} END {print n}' < $$i`; \
 			if test $$n_lm -eq 0 -o "x$(DSO_MODULES)" = "x"; then \
@@ -104,11 +106,14 @@
 
 install-htdocs:
 	@echo Installing HTML documents
-	@test -d $(DESTDIR)$(htdocsdir) || $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir)
-	@test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR)$(htdocsdir))
+	@test -d $(DESTDIR)$(htdocsdir).default || $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir).default
+	@test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR)$(htdocsdir).default)
+	@test -e $(DESTDIR)$(htdocsdir) || ln -sf $(DESTDIR)$(htdocsdir).default $(DESTDIR)$(htdocsdir)
+.if !defined(NOPORTDOCS)
 	@test -d $(DESTDIR)$(manualdir) || $(MKINSTALLDIRS) $(DESTDIR)$(manualdir)
 	@test -d $(top_srcdir)/docs/manual && (cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir))
-	-@test "x$(htdocsdir)" != "x" && cd $(DESTDIR)$(htdocsdir) && find . -name "CVS" -print | xargs rm -rf
+.endif
+	-@test "x$(htdocsdir)" != "x" && cd $(DESTDIR)$(htdocsdir).default && find . -name "CVS" -print | xargs rm -rf
 
 install-error:
 	@echo Installing error documents
@@ -124,9 +129,10 @@
 
 install-cgi:
 	@echo Installing CGIs
-	@test -d $(DESTDIR)$(cgidir) || $(MKINSTALLDIRS) $(DESTDIR)$(cgidir)
-	@cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir)
-	-@test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir) && find . -name "CVS" -print | xargs rm -rf
+	@test -d $(DESTDIR)$(cgidir).default || $(MKINSTALLDIRS) $(DESTDIR)$(cgidir).default
+	@cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir).default
+	@test -e $(DESTDIR)$(cgidir) || ln -sf $(DESTDIR)$(cgidir).default $(DESTDIR)$(cgidir)
+	-@test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir).default && find . -name "CVS" -print | xargs rm -rf
 
 install-other:
 	@test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir)