genwebgallery

view Makefile @ 46:b991e188f1fa

added some quotes around vars; increased to version 0.8
author meillo@marmaro.de
date Mon, 23 Jun 2008 20:05:50 +0200
parents cb1f0dda49e7
children
line source
1 # genwebgallery by meillo@marmaro.de
4 NAME=genwebgallery
5 VERSION=$(shell sed -n '/VERSION=/ s/^.*=//p' $(NAME) )
6 NV=${NAME}-${VERSION}
8 DOCS=COPYRIGHT ChangeLog TODO
10 # paths
11 PREFIX = /usr/local
12 BINDIR = ${PREFIX}/bin
13 MANDIR = ${PREFIX}/share/man
16 all:
17 @echo usage: make [un]install
20 dist: changelog
21 @echo "generating distribution tarball"
22 @mkdir ${NV}
23 @cp -f ${NAME} ${NAME}.1 Makefile ${DOCS} ${NV}
24 @tar -czho --owner 0 --group 0 -f ${NV}.tar.gz ${NV}
25 @rm -rf ${NV}
28 changelog:
29 @echo generating changelog from mercurial log
30 @hg log -v --style changelog > ChangeLog
33 install:
34 @echo installing executable file to ${DESTDIR}${BINDIR}
35 @mkdir -p ${DESTDIR}${BINDIR}
36 @cp -f ${NAME} ${DESTDIR}${BINDIR}
37 @chmod 755 ${DESTDIR}${BINDIR}/${NAME}
38 @echo installing manual page to ${DESTDIR}${MANDIR}/man1
39 @mkdir -p ${DESTDIR}${MANDIR}/man1
40 @cp -f ${NAME}.1 ${DESTDIR}${MANDIR}/man1
41 @chmod 644 ${DESTDIR}${MANDIR}/man1/${NAME}.1
44 uninstall:
45 @echo removing executable file from ${DESTDIR}${BINDIR}
46 @rm -f ${DESTDIR}${BINDIR}/${NAME}
47 @echo removing manual page from ${DESTDIR}${MANDIR}/man1
48 @rm -f ${DESTDIR}${MANDIR}/man1/${NAME}.1
51 clean:
52 @echo removing generated files
53 @rm -f ChangeLog
57 .PHONY: all dist changelog clean install uninstall