summaryrefslogtreecommitdiff
blob: f48102d929b77adb3a05e2209fe9fb6d634ace1a (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
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@
 else
 OSCFLAGS=-Wall -Wstrict-prototypes
 endif
-CFLAGS=-O2 $(DEBUG) -D$(OS) $(OSCFLAGS)
+CFLAGS += $(DEBUG) -D$(OS) $(OSCFLAGS)
 
 # engine
 ENGSRC=bdengine.c xmalloc.c
@@ -48,16 +48,15 @@
 
 else
 birthday: $(CMDOBJ)
-	$(CC) $(LDFLAGS) $(CMDOBJ) -o $@
+	$(CC) $(LDFLAGS) $(CMDOBJ) -o $@ $(LIBS)
 
 # you can override this to use the new FHS locations.
-SHARE=
-#SHARE=/share
+SHARE=/share
 
 install: birthday birthday.man
-	install -d $(DESTDIR)/usr/bin $(DESTDIR)/usr$(SHARE)/man/man1
-	install -s birthday $(DESTDIR)/usr/bin/birthday
-	install -m 0644 birthday.man $(DESTDIR)/usr$(SHARE)/man/man1/birthday.1
+	install -d $(DESTDIR)$(EPREFIX)/usr/bin $(DESTDIR)$(EPREFIX)/usr$(SHARE)/man/man1
+	install birthday $(DESTDIR)$(EPREFIX)/usr/bin/birthday
+	install -m 0644 birthday.man $(DESTDIR)$(EPREFIX)/usr$(SHARE)/man/man1/birthday.1
 
 test: birthday
 	sh runtest.sh -exec `pwd`/birthday test/*.t
--- a/runtest.sh
+++ b/runtest.sh
@@ -7,7 +7,7 @@
 unset PASSED FAILED TAKEN KEEP
 
 extract_section() {
-  sed -ne "/^\\*$1/,/^\\*/p" "$2" | grep -v '^*'
+  sed -ne "/^\\*$1/,/^\\*/p" "$2" | grep --binary-files=text -v '^*'
 }
 
 runtest() {