summaryrefslogtreecommitdiff
path: root/editors/mg2a/patches/patch-af
blob: 1ad3c8842c508329b40ba4740b05f2e372c7910e (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
$NetBSD: patch-af,v 1.2 2000/07/10 18:26:54 tron Exp $

--- Makefile.orig	Wed May 31 16:36:29 2000
+++ Makefile	Wed May 31 16:36:31 2000
@@ -17,7 +17,7 @@
 #	REGEX		-- create regular expression functions
 #
 #CDEFS	=  -DDO_METAKEY
-CDEFS	=  -DDO_METAKEY -DPREFIXREGION
+CDEFS	=  -DDO_METAKEY -DPREFIXREGION -DSTARTUPFILE=\"mg.rc\" -DNO_BACKUP -DSYMBLINK
 CFLAGS	= -g $(CDEFS)
 
 # Objects which only depend on the "standard" includes
@@ -42,8 +42,14 @@
 OINCS =	ttydef.h sysdef.h chrdef.h
 INCS =	def.h
 
+# refling - added these and the @ for peace and quiet.  All $(RM) and
+# $(LN) below are mine!  Also added the all target for NetBSD pkgs.
+
+RM = @rm -f
+LN = @ln
+
 mg:	$(OBJ)
-	cc $(CFLAGS) -o mg $(OBJ) $(LIBS)
+	gcc $(CFLAGS) -o mg $(OBJ) $(LIBS)
 
 # strip mg once you're satisfied it'll run -- makes it much smaller
 strip:
@@ -75,44 +81,52 @@
 $(OOBJS):	$(INCS) $(OINCS)
 
 sysdef.h:	sys/$(SYS)/sysdef.h	# Update links, if needed.
-	rm -f sysdef.h
-	ln sys/$(SYS)/sysdef.h .
+	$(RM) sysdef.h
+	$(LN) sys/$(SYS)/sysdef.h .
 
 ttydef.h:	sys/default/ttydef.h
-	rm -f ttydef.h
-	ln sys/default/ttydef.h .
+	$(RM) ttydef.h
+	$(LN) sys/default/ttydef.h .
 
 chrdef.h:	sys/default/chrdef.h
-	rm -f chrdef.h
-	ln sys/default/chrdef.h .
+	$(RM) chrdef.h
+	$(LN) sys/default/chrdef.h .
 
 fileio.c:	sys/$(SYS)/fileio.c
-	rm -f fileio.c
-	ln sys/$(SYS)/fileio.c .
+	$(RM) fileio.c
+	$(LN) sys/$(SYS)/fileio.c .
 
 spawn.c:	sys/$(SYS)/spawn.c
-	rm -f spawn.c
-	ln sys/$(SYS)/spawn.c .
+	$(RM) spawn.c
+	$(LN) sys/$(SYS)/spawn.c .
 
 tty.c:		sys/default/tty.c
-	rm -f tty.c
-	ln sys/default/tty.c .
+	$(RM) tty.c
+	$(LN) sys/default/tty.c .
 
 ttyio.c:	sys/$(SYS)/ttyio.c
-	rm -f ttyio.c
-	ln sys/$(SYS)/ttyio.c .
+	$(RM) ttyio.c
+	$(LN) sys/$(SYS)/ttyio.c .
 
 ttykbd.c:	sys/default/ttykbd.c
-	rm -f ttykbd.c
-	ln sys/default/ttykbd.c .
+	$(RM) ttykbd.c
+	$(LN) sys/default/ttykbd.c .
 
 cinfo.c:	sys/default/cinfo.c
-	rm -f cinfo.c
-	ln sys/default/cinfo.c .
+	$(RM) cinfo.c
+	$(LN)  sys/default/cinfo.c .
 
 port: $(SRCS) $(INCS)
-	rm -f port
+	$(RM) port
 	tar cfb port 1 $?
 
-clean:;	rm -f $(OBJ) $(OSRCS) $(OINCS)
+clean:;	$(RM) $(OBJ) $(OSRCS) $(OINCS) mg
+
+all:	$(OBJ)
+	cc $(CFLAGS) -o mg $(OBJ) $(LIBS)
+	strip mg
 
+install:
+	$(INSTALL_PROGRAM) mg $(PREFIX)/bin
+	$(INSTALL_DATA) mg.rc $(PREFIX)/bin
+	$(INSTALL_DATA) mg.1 $(PREFIX)/man/man1