forked from fanf2/unifdef
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
75 lines (61 loc) · 1.64 KB
/
Makefile
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
# Makefile for unifdef
prefix = ${HOME}
bindir = ${prefix}/bin
mandir = ${prefix}/share/man
man1dir= ${mandir}/man1
bindest= ${DESTDIR}${bindir}
man1dest= ${DESTDIR}${man1dir}
all: unifdef
unifdef: unifdef.c
unifdef.c: version.h
version.h version.sh::
./reversion.sh
test: unifdef
./runtests.sh tests
install: unifdef unifdefall.sh unifdef.1
: commands
install -m 755 -d ${bindest}
install -m 755 unifdef ${bindest}/
install -m 755 unifdefall.sh ${bindest}/unifdefall
: manual
install -m 755 -d ${man1dest}
install -m 644 unifdef.1 ${man1dest}/
ln -s unifdef.1 ${man1dest}/unifdefall.1
clean:
rm -f unifdef version.h
rm -f tests/*.out tests/*.err tests/*.rc
realclean: clean
rm -f unifdef.txt
[ ! -d .git ] || rm -f Changelog version.sh
find . -name .git -prune -o \( \
-name '*~' -o -name '.#*' -o \
-name '*.orig' -o -name '*.core' \
\) -delete
DISTFILES= \
Changelog \
COPYING \
INSTALL \
Makefile \
README \
reversion.sh \
runtests.sh \
tests \
unifdef.c \
unifdef.1 \
unifdef.txt \
unifdefall.sh \
version.sh
release: version.sh unifdef.txt Changelog
. version.sh; \
mkdir web/$$V; cp -R ${DISTFILES} web/$$V; \
cd web; tar cfz $$V.tar.gz $$V; rm -R $$V
unifdef.txt: unifdef.1
nroff -Tascii -mdoc unifdef.1 | sed -e 's/.//g' >unifdef.txt
Changelog:
line="---------------------------------------------------"; \
git log --no-merges --stat --pretty=format:"$$line%n%ai %an <%ae>%n%n%s%n%n%b" |\
awk '/^$$/ { n++ } \
/./ && !n { print } \
/./ && n { print ""; print; n=0 } \
END { print ""; print "'$$line'" }' >Changelog
# eof