summaryrefslogtreecommitdiff
path: root/system/heirloom-sh/makefile.patch
blob: 5f370d9d9f59482baadf72134cae4271103c3b4a (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
diff -Naurp heirloom-sh-050706.orig//makefile heirloom-sh-050706//makefile
--- heirloom-sh-050706.orig//makefile	2005-07-06 06:59:57.000000000 -0400
+++ heirloom-sh-050706//makefile	2010-11-09 23:52:32.200954003 -0500
@@ -7,12 +7,12 @@ ROOT=
 #
 # The destination directory for the "sh" and "jsh" binaries.
 #
-SV3BIN=/usr/5bin
+SV3BIN=/usr/bin
 
 #
 # Location for manual pages (with man1 below).
 #
-MANDIR=/usr/share/man/5man
+MANDIR=/usr/man
 
 #
 # Enable this definition if spell checking should be done for the
@@ -23,7 +23,7 @@ MANDIR=/usr/share/man/5man
 #
 # A BSD-compatible install command.
 #
-UCBINST=/usr/ucb/install
+UCBINST=/usr/bin/install
 
 #
 # The strip command that is used at installation time.
@@ -49,7 +49,7 @@ CFLAGS=-O
 #
 # Flags for the C preprocessor.
 #
-CFLAGS=-D_GNU_SOURCE
+CPPFLAGS=-D_GNU_SOURCE
 
 #
 # A define for large file support, if necessary.
@@ -81,11 +81,11 @@ OBJ = args.o blok.o bltin.o cmd.o ctype.
 all: sh jsh sh.1.out
 
 sh: $(OBJ)
-	$(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o sh
+	$(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o hsh
 
 jsh: sh
 	rm -f jsh
-	$(LNS) sh jsh
+	$(LNS) hsh jsh
 
 sh.1.out: sh.1
 	test "x$(SPELL)" != x && cat sh.1 >$@ || \
@@ -93,17 +93,17 @@ sh.1.out: sh.1
 
 install: all
 	test -d $(ROOT)$(SV3BIN) || mkdir -p $(ROOT)$(SV3BIN)
-	$(UCBINST) -c -m 755 sh $(ROOT)$(SV3BIN)/sh
-	$(STRIP) $(ROOT)$(SV3BIN)/sh
+	$(UCBINST) -c -m 755 hsh $(ROOT)$(SV3BIN)/hsh
+	$(STRIP) $(ROOT)$(SV3BIN)/hsh
 	rm -f $(ROOT)$(SV3BIN)/jsh
-	cd $(ROOT)$(SV3BIN) && $(LNS) sh jsh
+	cd $(ROOT)$(SV3BIN) && $(LNS) hsh jsh
 	test -d $(ROOT)$(MANDIR)/man1 || mkdir -p $(ROOT)$(MANDIR)/man1
-	$(UCBINST) -c -m 644 sh.1.out $(ROOT)$(MANDIR)/man1/sh.1
+	$(UCBINST) -c -m 644 sh.1.out $(ROOT)$(MANDIR)/man1/hsh.1
 	rm -f $(ROOT)$(MANDIR)/man1/jsh.1
-	cd $(ROOT)$(MANDIR)/man1 && $(LNS) sh.1 jsh.1
+	cd $(ROOT)$(MANDIR)/man1 && $(LNS) hsh.1 jsh.1
 
 maninstall: sh.1.out
-	$(UCBINST) -c -m 644 sh.1.out $(ROOT)$(MANDIR)/man1/sh.1
+	$(UCBINST) -c -m 644 sh.1.out $(ROOT)$(MANDIR)/man1/hsh.1
 
 diet:
 	$(MAKE) CC='diet gcc -Ifakewchar' CFLAGS='-Os -fomit-frame-pointer' \
@@ -123,7 +123,7 @@ world:
 	$(MAKE) clean
 
 clean:
-	rm -f $(OBJ) sh jsh sh.1.out core log *~
+	rm -f $(OBJ) hsh jsh sh.1.out core log *~
 
 mrproper: clean