]> git.wh0rd.org - patches.git/blame - minised-build.patch
initial import
[patches.git] / minised-build.patch
CommitLineData
5e993f12 1Index: Makefile
2===================================================================
3--- Makefile (revision 104)
4+++ Makefile (working copy)
5@@ -2,19 +2,23 @@
6
7 # If your compiler does not support this flags, just remove them.
8 # They only ensure that no new warning regressions make it into the source.
9-CFLAGS = -Wall -Wwrite-strings
10+CFLAGS += -Wall -Wwrite-strings
11
12+DESTDIR=
13 PREFIX=/usr
14+BINDIR=$(PREFIX)/bin
15+MANDIR=$(PREFIX)/share/man/man1
16
17 minised: sedcomp.o sedexec.o
18- $(CC) $(LFLAGS) sedcomp.o sedexec.o -o minised
19+ $(CC) $(LDFLAGS) sedcomp.o sedexec.o -o minised
20
21 sedcomp.o: sedcomp.c sed.h
22 sedexec.o: sedexec.c sed.h
23
24 install:
25- install minised $(PREFIX)/bin/
26- install minised.1 $(PREFIX)/man/man1/
27+ install -d -m 755 $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)
28+ install -m 755 minised $(DESTDIR)$(BINDIR)
29+ install -m 644 minised.1 $(DESTDIR)$(MANDIR)
30
31 clean:
32 rm -f minised sedcomp.o sedexec.o
33@@ -22,3 +26,4 @@ clean:
34 check: minised
35 cd tests; ./run ../minised
36
37+.PHONY: install clean check