Mercurial > bday
annotate Makefile @ 4:5326c222cd4e
removed MESSAGE; code beautifing
workaround for MESSAGE: use an event with warn 0 (message=yyyy-mm-dd w 0)
author | meillo@marmaro.de |
---|---|
date | Mon, 17 Dec 2007 12:14:41 +0100 (2007-12-17) |
parents | dc2f94280b01 |
children | 5af6bf2cb271 |
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 |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
8 DOCS=COPYRIGHT ChangeLog TODO |
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 |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
15 SRC=birthday.c bdengine.c |
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 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
18 CFLAGS=-O2 -Wall -Wstrict-prototypes |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
19 |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
20 all: |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
21 @echo usage: make [un]install |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
22 |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
23 build: ${NAME} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
24 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
25 ${NAME}: $(OBJ) |
0
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
26 $(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
|
27 |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
28 dist: build changelog |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
29 @mkdir -p ${NV} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
30 @cp -f ${NAME} ${NAME}.1 Makefile ${DOCS} ${NV} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
31 @tar -czhof ${NV}.tar.gz ${NV} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
32 @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
|
33 |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
34 deb: dist |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
35 @mkdir -p Packages |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
36 @cp ${NV}.tar.gz Packages/ |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
37 @( \ |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
38 cd Packages/ ;\ |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
39 tar -xzf ${NV}.tar.gz ;\ |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
40 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
|
41 cd ${NV}/ ;\ |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
42 cp -r ../../debian/ . ;\ |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
43 debuild ;\ |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
44 ) |
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 changelog: |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
47 @echo generating changelog from mercurial log |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
48 @hg log -v --style changelog > ChangeLog |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
49 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
50 install: |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
51 @echo installing executable file to ${DESTDIR}${BINDIR} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
52 @mkdir -p ${DESTDIR}${BINDIR} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
53 @cp ${NAME} ${DESTDIR}${BINDIR} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
54 @chmod 755 ${DESTDIR}${BINDIR}/${NAME} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
55 @echo installing manual page to ${DESTDIR}${MANDIR}/man1 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
56 @mkdir -p ${DESTDIR}${MANDIR}/man1 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
57 @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
|
58 @chmod 644 ${DESTDIR}${MANDIR}/man1/${NAME}.1 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
59 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
60 uninstall: |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
61 @echo removing executable file from ${DESTDIR}${BINDIR} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
62 @rm -f ${DESTDIR}${BINDIR}/${NAME} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
63 @echo removing manual page from ${DESTDIR}${MANDIR}/man1 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
64 @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
|
65 |
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 clean: |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
68 rm -f *.o |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
69 |
22b6e71de68e
initial commit; codebase from birthday; just the needed stuff; substituted getopt by own code
meillo@marmaro.de
parents:
diff
changeset
|
70 realclean: clean |
3
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
71 rm -f ${NAME} |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
72 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
73 distclean: realclean |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
74 @rm -f ${NAME}-*.tar.gz ChangeLog |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
75 |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
76 debclean: distclean |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
77 @cd Packages/${NV}/ ; debuild clean ; |
dc2f94280b01
new Makefile; removed MinWarn and MaxWarn; adjusted manpage
meillo@marmaro.de
parents:
1
diff
changeset
|
78 |
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 .PHONY: all dist deb changelog clean distclean debclean build install uninstall |