Makefile (962B)
1 # See LICENSE file for copyright and license details. 2 # sbrs - simple blog and rss system 3 .POSIX: 4 5 SH = sbrs 6 VERSION = 0.1 7 DIST = ${SH}-${VERSION} 8 MAN1 = ${SH}.1 9 PREFIX = /usr/local 10 MANPREFIX = ${PREFIX}/share/man 11 # OpenBSD 12 #MANPREFIX = ${PREFIX}/man 13 14 all: ${SH} 15 chmod +x ${SH} 16 17 dist: 18 mkdir -p ${DIST} 19 cp -R articles.html index.html LICENSE Makefile rss.xml \ 20 sbrs sbrs.1 styles.css template.html ${DIST} 21 tar -cf ${DIST}.tar ${DIST} 22 gzip ${DIST}.tar 23 rm -rf ${DIST} 24 25 install: all 26 mkdir -p ${DESTDIR}${PREFIX}/bin ${DESTDIR}${MANPREFIX}/man1 27 cp -f ${SH} ${DESTDIR}${PREFIX}/bin 28 cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1 29 sed "s/VERSION/${VERSION}/g" < ${MAN1} > ${DESTDIR}${MANPREFIX}/man1/${MAN1} 30 chmod 755 ${DESTDIR}${PREFIX}/bin/${SH} 31 chmod 644 ${DESTDIR}${MANPREFIX}/man1/${MAN1} 32 33 uninstall: 34 rm -f ${DESTDIR}${PREFIX}/bin/${SH} \ 35 ${DESTDIR}${MANPREFIX}/man1/${MAN1} 36 37 clean: 38 rm -f ${DIST}.tar.gz 39 40 .PHONY: all clean dist install uninstall