Mercurial > bday
annotate Makefile @ 13:a1ac59b7916b
some stuff in debian files
author | meillo@marmaro.de |
---|---|
date | Thu, 13 Nov 2008 13:30:40 +0100 |
parents | dc220ec8248d |
children | 79d22407a6be |
rev | line source |
---|---|
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
1 # bday by meillo@marmaro.de |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
2 |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
3 |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
4 NAME=bday |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
5 VERSION = 0.1 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
6 NV=${NAME}-${VERSION} |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
7 |
12 | 8 DOCS=COPYRIGHT COPYING ChangeLog TODO examples |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
9 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
10 # paths |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
11 PREFIX = /usr |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
12 BINDIR = ${PREFIX}/bin |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
13 MANDIR = ${PREFIX}/share/man |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
14 |
7 | 15 SRC=bday.c |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
16 OBJ=$(SRC:.c=.o) |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
17 |
5
5af6bf2cb271
reads only stdin now, no files anymore; removed -f option aswell; code beatifing
meillo@marmaro.de
parents:
3
diff
changeset
|
18 CFLAGS=-O2 -Wall |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
19 |
5
5af6bf2cb271
reads only stdin now, no files anymore; removed -f option aswell; code beatifing
meillo@marmaro.de
parents:
3
diff
changeset
|
20 all: build |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
21 |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
22 build: ${NAME} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
23 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
24 ${NAME}: $(OBJ) |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
25 $(CC) $(LDFLAGS) $(OBJ) -o $@ |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
26 |
5
5af6bf2cb271
reads only stdin now, no files anymore; removed -f option aswell; code beatifing
meillo@marmaro.de
parents:
3
diff
changeset
|
27 car: clean all |
5af6bf2cb271
reads only stdin now, no files anymore; removed -f option aswell; code beatifing
meillo@marmaro.de
parents:
3
diff
changeset
|
28 |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
29 dist: build changelog |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
30 @mkdir -p ${NV} |
12 | 31 @cp -rf ${NAME} ${SRC} ${NAME}.1 Makefile ${DOCS} ${NV} |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
32 @tar -czhof ${NV}.tar.gz ${NV} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
33 @rm -rf ${NV} |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
34 |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
35 deb: dist |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
36 @mkdir -p Packages |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
37 @cp ${NV}.tar.gz Packages/ |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
38 @( \ |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
39 cd Packages/ ;\ |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
40 tar -xzf ${NV}.tar.gz ;\ |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
41 mv ${NV}.tar.gz ${NAME}_${VERSION}.orig.tar.gz ;\ |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
42 cd ${NV}/ ;\ |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
43 cp -r ../../debian/ . ;\ |
12 | 44 debuild -sa ;\ |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
45 ) |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
46 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
47 changelog: |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
48 @echo generating changelog from mercurial log |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
49 @hg log -v --style changelog > ChangeLog |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
50 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
51 install: |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
52 @echo installing executable file to ${DESTDIR}${BINDIR} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
53 @mkdir -p ${DESTDIR}${BINDIR} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
54 @cp ${NAME} ${DESTDIR}${BINDIR} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
55 @chmod 755 ${DESTDIR}${BINDIR}/${NAME} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
56 @echo installing manual page to ${DESTDIR}${MANDIR}/man1 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
57 @mkdir -p ${DESTDIR}${MANDIR}/man1 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
58 @sed 's/VERSION/${VERSION}/g' < ${NAME}.1 > ${DESTDIR}${MANDIR}/man1/${NAME}.1 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
59 @chmod 644 ${DESTDIR}${MANDIR}/man1/${NAME}.1 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
60 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
61 uninstall: |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
62 @echo removing executable file from ${DESTDIR}${BINDIR} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
63 @rm -f ${DESTDIR}${BINDIR}/${NAME} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
64 @echo removing manual page from ${DESTDIR}${MANDIR}/man1 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
65 @rm -f ${DESTDIR}${MANDIR}/man1/${NAME}.1 |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
66 |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
67 |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
68 clean: |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
69 rm -f *.o |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
70 |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
71 realclean: clean |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
72 rm -f ${NAME} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
73 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
74 distclean: realclean |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
75 @rm -f ${NAME}-*.tar.gz ChangeLog |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
76 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
77 debclean: distclean |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
78 @cd Packages/${NV}/ ; debuild clean ; |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
79 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
80 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
81 .PHONY: all dist deb changelog clean distclean debclean build install uninstall |