summaryrefslogtreecommitdiff
path: root/www/cgilib/patches/patch-ab
blob: 9e6068f85c82df36b87cdbdeba7140d46b089d6f (plain)
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
52
53
54
$NetBSD: patch-ab,v 1.2 1999/11/08 17:25:00 wennmach Exp $
--- Makefile.orig	Fri Aug 20 23:14:07 1999
+++ Makefile	Mon Nov  8 18:06:31 1999
@@ -14,30 +14,38 @@
 #   along with this program; if not, write to the Free Software
 #   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
 
-CFLAGS = -I. -Wall -O2 -g
+CFLAGS = -I. -Wall -O2
 LDFLAGS = -L.
 LIBS = -lcgi
 
 OBJS = cgi.o cookies.o
 
+all:: libcgi.a cgitest jumpto htmlman
+
 libcgi.a: $(OBJS)
-	ar rc $@ $^
+	ar ruv $@ $(OBJS)
 
 cgitest: cgitest.o libcgi.a
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ cgitest.o $(LIBS)
 
 jumpto: jumpto.o libcgi.a
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ jumpto.o $(LIBS)
 
-all: libcgi.a cgitest jumpto
+htmlman:
+	for f in *.[35]; do \
+	  nroff -mandoc $$f|rman -f HTML --title $$f -r "%s.%s.html" > $$f.html; \
+	done
 
-install: cgitest
-	install -m 755 cgitest /usr/lib/cgi-bin
+install:
+	-mkdir -p ${PREFIX}/libexec/cgi-bin
+	install -c -m 755 cgitest ${PREFIX}/libexec/cgi-bin
+	install -c -m 755 jumpto ${PREFIX}/libexec/cgi-bin
+	install -c -m 444 libcgi.a ${PREFIX}/lib
+	install -c -m 444 cgi.h ${PREFIX}/include
+	-mkdir -p ${PREFIX}/share/doc/cgilib
+	for i in *.html; do \
+          install -c -m 444 $$i ${PREFIX}/share/doc/cgilib ; \
+        done
 
 clean:
 	rm -f cgitest cgitest.o jumpto jumpto.o libcgi.a $(OBJS) *.[35].html
-
-htmlman:
-	for f in *.[35]; do \
-	  man -l $$f|rman -f HTML --title $$f -r "%s.%s.html" > $$f.html; \
-	done