summaryrefslogtreecommitdiffstats
path: root/net/dgd/files/patch-aa
blob: 6b66c026ea3ae48a53a313a51e919ee4f4090a11 (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
55
56
$FreeBSD$

--- src/Makefile.orig	Mon Aug 26 07:21:20 2002
+++ src/Makefile	Mon Aug 26 09:24:19 2002
@@ -3,13 +3,12 @@
 #
 HOST=	NETBSD
 DEFINES=-D$(HOST) #-DDUMP_FUNCS
-DEBUG=	-O2
 CCFLAGS=$(DEFINES) $(DEBUG)
-CFLAGS=	-I. -Icomp -Ilex -Ied -Iparser -Ikfun $(CCFLAGS)
+CFLAGS+=	-I. -Icomp -Ilex -Ied -Iparser -Ikfun $(CCFLAGS)
 LDFLAGS=
 LIBS=
 LINTFLAGS=-abcehpruz
-CC=	gcc
+CC?=	gcc
 LD=	$(CC)
 DMAKE=	make
 YACC=	yacc
@@ -22,6 +21,8 @@
 COMPOBJ=alloc.o error.o hash.o path.o str.o array.o object.o data.o \
 	interpret.o config.o
 
+all: a.out comp/a.out
+
 a.out:	$(OBJ) always
 	cd comp; $(DMAKE) 'CC=$(CC)' 'CCFLAGS=$(CCFLAGS)' 'YACC=$(YACC)' dgd
 	cd lex; $(DMAKE) 'CC=$(CC)' 'CCFLAGS=$(CCFLAGS)' dgd
@@ -39,10 +40,15 @@
 	@rm -f a.out
 
 $(BIN)/driver: a.out
+	-mkdir $(BIN)
 	-mv $(BIN)/driver $(BIN)/driver.old
 	cp a.out $(BIN)/driver
 
-install: $(BIN)/driver
+$(BIN)/precomp: comp/a.out
+	-mv $(BIN)/precomp $(BIN)/precomp.old
+	cp comp/a.out $(BIN)/precomp
+
+install: $(BIN)/driver $(BIN)/precomp
 
 lint:
 	lint $(LINTFLAGS) $(CFLAGS) $(SRC)
@@ -68,7 +74,8 @@
 
 comp/a.out:
 	cd comp; $(DMAKE) 'DMAKE=$(DMAKE)' 'CC=$(CC)' 'CCFLAGS=$(CCFLAGS)' \
-			  'YACC=$(YACC)' 'LIBS=$(LIBS)' a.out
+			  'LDFLAGS=$(LDFLAGS)' 'YACC=$(YACC)' 'LIBS=$(LIBS)' \
+			  a.out
 
 clean:
 	rm -f a.out $(OBJ) comp.sub lex.sub ed.sub
OpenPOWER on IntegriCloud