genwebgallery
annotate Makefile @ 22:cb1f0dda49e7
simplified Makefile to what is really needed
author | meillo@marmaro.de |
---|---|
date | Mon, 12 May 2008 11:54:04 +0200 |
parents | 332ea19d9aaf |
children | 468db487b347 |
rev | line source |
---|---|
meillo@0 | 1 # genwebgallery by meillo@marmaro.de |
meillo@0 | 2 |
meillo@0 | 3 |
meillo@0 | 4 NAME=genwebgallery |
meillo@22 | 5 VERSION=$(shell sed -n '/VERSION=/ s/^.*=//p' $(NAME) ) |
meillo@0 | 6 NV=${NAME}-${VERSION} |
meillo@2 | 7 |
meillo@4 | 8 DOCS=COPYRIGHT ChangeLog TODO |
meillo@15 | 9 |
meillo@15 | 10 # paths |
meillo@22 | 11 PREFIX = /usr/local |
meillo@0 | 12 BINDIR = ${PREFIX}/bin |
meillo@0 | 13 MANDIR = ${PREFIX}/share/man |
meillo@0 | 14 |
meillo@22 | 15 |
meillo@0 | 16 all: |
meillo@0 | 17 @echo usage: make [un]install |
meillo@0 | 18 |
meillo@0 | 19 |
meillo@2 | 20 dist: changelog |
meillo@22 | 21 @echo "generating distribution tarball" |
meillo@0 | 22 @mkdir ${NV} |
meillo@2 | 23 @cp -f ${NAME} ${NAME}.1 Makefile ${DOCS} ${NV} |
meillo@22 | 24 @tar -czho --owner 0 --group 0 -f ../${NV}.tar.gz ${NV} |
meillo@0 | 25 @rm -rf ${NV} |
meillo@0 | 26 |
meillo@2 | 27 |
meillo@2 | 28 changelog: |
meillo@2 | 29 @echo generating changelog from mercurial log |
meillo@4 | 30 @hg log -v --style changelog > ChangeLog |
meillo@2 | 31 |
meillo@22 | 32 |
meillo@0 | 33 install: |
meillo@0 | 34 @echo installing executable file to ${DESTDIR}${BINDIR} |
meillo@0 | 35 @mkdir -p ${DESTDIR}${BINDIR} |
meillo@0 | 36 @cp -f ${NAME} ${DESTDIR}${BINDIR} |
meillo@0 | 37 @chmod 755 ${DESTDIR}${BINDIR}/${NAME} |
meillo@0 | 38 @echo installing manual page to ${DESTDIR}${MANDIR}/man1 |
meillo@0 | 39 @mkdir -p ${DESTDIR}${MANDIR}/man1 |
meillo@22 | 40 @cp -f ${NAME}.1 ${DESTDIR}${MANDIR}/man1 |
meillo@0 | 41 @chmod 644 ${DESTDIR}${MANDIR}/man1/${NAME}.1 |
meillo@0 | 42 |
meillo@22 | 43 |
meillo@0 | 44 uninstall: |
meillo@0 | 45 @echo removing executable file from ${DESTDIR}${BINDIR} |
meillo@0 | 46 @rm -f ${DESTDIR}${BINDIR}/${NAME} |
meillo@0 | 47 @echo removing manual page from ${DESTDIR}${MANDIR}/man1 |
meillo@0 | 48 @rm -f ${DESTDIR}${MANDIR}/man1/${NAME}.1 |
meillo@0 | 49 |
meillo@22 | 50 |
meillo@0 | 51 clean: |
meillo@22 | 52 @echo removing generated files |
meillo@22 | 53 @rm -f ChangeLog |
meillo@0 | 54 |
meillo@0 | 55 |
meillo@0 | 56 |
meillo@22 | 57 .PHONY: all dist changelog clean install uninstall |