summaryrefslogtreecommitdiffstats
path: root/misc/sloccount/files/patch-makefile
blob: 6c6e8d22a86183661ec1c3f592a672138a8a8842 (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
--- makefile.orig	Fri May 31 05:31:34 2002
+++ makefile	Sat Jun  1 13:33:20 2002
@@ -10,7 +10,6 @@
 # Set this for where to store the man pages and executables.
 # If you want to store this as part of an official distribution,
 # change this to "/usr":
-PREFIX=/usr/local
 
 # Set "EXE_SUFFIX" to ".exe" if you're running on Windows, like this:
 # EXE_SUFFIX=.exe
@@ -19,7 +18,6 @@
 # Set this to your C compiler, if it's not "gcc"; a likely alternative is "cc".
 # The "-Wall" option turns on warnings in gcc.  gcc users might also want
 # to consider using "-Werror", which turns warnings into errors.
-CC=gcc -Wall
 
 # Set this to the name of your "install" program.  On some systems,
 # "install -C" would be useful (so unchanged files won't be modified),
@@ -47,7 +45,7 @@
 ARCH=i386
 VERSIONEDNAME=$(NAME)-$(VERSION)
 INSTALL_DIR=$(PREFIX)/bin
-MAN_DIR=$(PREFIX)/share/man
+MAN_DIR=$(PREFIX)/man
 MAN_DIR_MAN1=$(MAN_DIR)/man1
 DOC_DIR=$(PREFIX)/share/doc/$(VERSIONEDNAME)-$(RPM_VERSION)
 POSTED_DIR=/home/dwheeler/dwheeler.com/sloccount
@@ -92,7 +90,7 @@
    sql_count \
    tcl_count
 
-MANPAGES=sloccount.1.gz
+MANPAGES=sloccount.1
 
 MYDOCS=sloccount.html README TODO ChangeLog
 
@@ -100,13 +98,13 @@
 all: lexcount1$(EXE_SUFFIX) c_count$(EXE_SUFFIX) java_count$(EXE_SUFFIX) php_count$(EXE_SUFFIX)
 
 lexcount1$(EXE_SUFFIX): lexcount1.c
-	$(CC) lexcount1.c -o lexcount1$(EXE_SUFFIX)
+	$(CC) ${CFLAGS} lexcount1.c -o lexcount1$(EXE_SUFFIX)
 
 c_count$(EXE_SUFFIX): c_count.c
-	$(CC) c_count.c -o c_count$(EXE_SUFFIX)
+	$(CC) ${CFLAGS} c_count.c -o c_count$(EXE_SUFFIX)
 
 php_count$(EXE_SUFFIX): php_count.c
-	$(CC) php_count.c -o php_count$(EXE_SUFFIX)
+	$(CC) ${CFLAGS} php_count.c -o php_count$(EXE_SUFFIX)
 
 sloccount.1.gz: sloccount.1
 	gzip -c sloccount.1 > sloccount.1.gz
@@ -117,25 +115,23 @@
 
 # This is USC's code counter, not built by default:
 c_lines: C_LINES.C
-	$(CC) C_LINES.C -o c_lines$(EXE_SUFFIX)
+	$(CC) ${CFLAGS} C_LINES.C -o c_lines$(EXE_SUFFIX)
 
 
 install_programs: all
-	$(INSTALL) $(EXECUTABLES) $(INSTALL_DIR)
+	${BSD_INSTALL_SCRIPT} $(EXECUTABLES) $(INSTALL_DIR)
 
 uninstall_programs:
 	cd $(INSTALL_DIR) && rm -f $(EXECUTABLES)
 
 install_man:
-	$(INSTALL_A_DIR) $(MAN_DIR_MAN1)
-	$(INSTALL) $(MANPAGES) $(MAN_DIR_MAN1)
+	${BSD_INSTALL_MAN} $(MANPAGES) $(MAN_DIR_MAN1)
 
 uninstall_man:
 	cd $(MAN_DIR_MAN1) && rm -f $(MANPAGES)
 
 install_docs: install_man
-	$(INSTALL_A_DIR) $(DOC_DIR)
-	$(INSTALL) $(MYDOCS) $(DOC_DIR)
+	${BSD_INSTALL_DATA} $(MYDOCS) $(DOC_DIR)
 
 uninstall_docs:
 	cd $(DOC_DIR) && rm -f $(MYDOCS) && rmdir $(DOC_DIR)
OpenPOWER on IntegriCloud