genwebgallery

diff 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
line diff
     1.1 --- a/Makefile	Sat May 10 21:48:21 2008 +0200
     1.2 +++ b/Makefile	Mon May 12 11:54:04 2008 +0200
     1.3 @@ -2,44 +2,34 @@
     1.4  
     1.5  
     1.6  NAME=genwebgallery
     1.7 -VERSION = 0.5
     1.8 +VERSION=$(shell sed -n '/VERSION=/ s/^.*=//p' $(NAME) )
     1.9  NV=${NAME}-${VERSION}
    1.10  
    1.11  DOCS=COPYRIGHT ChangeLog TODO
    1.12  
    1.13  # paths
    1.14 -PREFIX = /usr
    1.15 +PREFIX = /usr/local
    1.16  BINDIR = ${PREFIX}/bin
    1.17  MANDIR = ${PREFIX}/share/man
    1.18  
    1.19 +
    1.20  all:
    1.21  	@echo usage: make [un]install
    1.22  
    1.23 -build:
    1.24 -	@echo build unneeded
    1.25  
    1.26  dist: changelog
    1.27 +	@echo "generating distribution tarball"
    1.28  	@mkdir ${NV}
    1.29  	@cp -f ${NAME} ${NAME}.1 Makefile ${DOCS} ${NV}
    1.30 -	@tar -czho --owner 0 --group 0 -f ${NV}.tar.gz ${NV}
    1.31 +	@tar -czho --owner 0 --group 0 -f ../${NV}.tar.gz ${NV}
    1.32  	@rm -rf ${NV}
    1.33  
    1.34 -deb: dist
    1.35 -	@mkdir -p Packages
    1.36 -	@cp ${NV}.tar.gz Packages/
    1.37 -	@( \
    1.38 -		cd Packages/ ;\
    1.39 -		tar -xzf ${NV}.tar.gz ;\
    1.40 -		mv ${NV}.tar.gz ${NAME}_${VERSION}.orig.tar.gz ;\
    1.41 -		cd ${NV}/ ;\
    1.42 -		cp -r ../../debian/ . ;\
    1.43 -		debuild -as ;\
    1.44 -	 )
    1.45  
    1.46  changelog:
    1.47  	@echo generating changelog from mercurial log
    1.48  	@hg log -v --style changelog > ChangeLog
    1.49  
    1.50 +
    1.51  install:
    1.52  	@echo installing executable file to ${DESTDIR}${BINDIR}
    1.53  	@mkdir -p ${DESTDIR}${BINDIR}
    1.54 @@ -47,23 +37,21 @@
    1.55  	@chmod 755 ${DESTDIR}${BINDIR}/${NAME}
    1.56  	@echo installing manual page to ${DESTDIR}${MANDIR}/man1
    1.57  	@mkdir -p ${DESTDIR}${MANDIR}/man1
    1.58 -	@sed 's/VERSION/${VERSION}/g' < ${NAME}.1 > ${DESTDIR}${MANDIR}/man1/${NAME}.1
    1.59 +	@cp -f ${NAME}.1 ${DESTDIR}${MANDIR}/man1
    1.60  	@chmod 644 ${DESTDIR}${MANDIR}/man1/${NAME}.1
    1.61  
    1.62 +
    1.63  uninstall:
    1.64  	@echo removing executable file from ${DESTDIR}${BINDIR}
    1.65  	@rm -f ${DESTDIR}${BINDIR}/${NAME}
    1.66  	@echo removing manual page from ${DESTDIR}${MANDIR}/man1
    1.67  	@rm -f ${DESTDIR}${MANDIR}/man1/${NAME}.1
    1.68  
    1.69 +
    1.70  clean:
    1.71 -	@echo clean unneeded
    1.72 +	@echo removing generated files
    1.73 +	@rm -f ChangeLog
    1.74  
    1.75 -distclean: clean
    1.76 -	@rm -f ${NAME}-*.tar.gz ChangeLog
    1.77  
    1.78 -debclean: distclean
    1.79 -	@cd Packages/${NV}/ ; debuild clean ;
    1.80  
    1.81 -
    1.82 -.PHONY: all dist deb changelog clean distclean debclean build install uninstall
    1.83 +.PHONY: all dist changelog clean install uninstall