From a5edc50032fae1231acb44b946b060e54aca9560 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sun, 10 Apr 2016 13:53:38 +0200 Subject: improve Makefile --- Makefile | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 9bbd2c0..3d8804a 100644 --- a/Makefile +++ b/Makefile @@ -69,54 +69,54 @@ ${LIBXML}: ${LIBXMLOBJ} ${RANLIB} $@ dist: - rm -rf ${NAME}-${VERSION} - mkdir -p ${NAME}-${VERSION} + rm -rf "${NAME}-${VERSION}" + mkdir -p "${NAME}-${VERSION}" cp -f ${MAN1} ${MAN5} ${DOC} ${HDR} \ ${SRC} ${LIBXMLSRC} ${LIBUTILSRC} ${SCRIPTS} \ Makefile config.mk \ sfeedrc.example style.css \ - ${NAME}-${VERSION} + "${NAME}-${VERSION}" # make tarball - tar -cf - ${NAME}-${VERSION} | \ - gzip -c > ${NAME}-${VERSION}.tar.gz - rm -rf ${NAME}-${VERSION} + tar -cf - "${NAME}-${VERSION}" | \ + gzip -c > "${NAME}-${VERSION}.tar.gz" + rm -rf "${NAME}-${VERSION}" clean: rm -f ${BIN} ${OBJ} ${LIB} install: all # installing executable files and scripts. - mkdir -p ${DESTDIR}${PREFIX}/bin - cp -f ${BIN} ${SCRIPTS} ${DESTDIR}${PREFIX}/bin - for f in $(BIN) $(SCRIPTS); do chmod 755 ${DESTDIR}${PREFIX}/bin/$$f; done + mkdir -p "${DESTDIR}${PREFIX}/bin" + cp -f ${BIN} ${SCRIPTS} "${DESTDIR}${PREFIX}/bin" + for f in $(BIN) $(SCRIPTS); do chmod 755 "${DESTDIR}${PREFIX}/bin/$$f"; done # installing example files. - mkdir -p ${DESTDIR}${PREFIX}/share/${NAME} + mkdir -p "${DESTDIR}${PREFIX}/share/${NAME}" cp -f sfeedrc.example\ style.css\ README\ README.xml\ - ${DESTDIR}${PREFIX}/share/${NAME} + "${DESTDIR}${PREFIX}/share/${NAME}" # installing manual pages for tools. - mkdir -p ${DESTDIR}${MANPREFIX}/man1 - cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1 - for m in $(MAN1); do chmod 644 ${DESTDIR}${MANPREFIX}/man1/$$m; done + mkdir -p "${DESTDIR}${MANPREFIX}/man1" + cp -f ${MAN1} "${DESTDIR}${MANPREFIX}/man1" + for m in $(MAN1); do chmod 644 "${DESTDIR}${MANPREFIX}/man1/$$m"; done # installing manual pages for sfeedrc(5). - mkdir -p ${DESTDIR}${MANPREFIX}/man5 - cp -f ${MAN5} ${DESTDIR}${MANPREFIX}/man5 - for m in $(MAN5); do chmod 644 ${DESTDIR}${MANPREFIX}/man5/$$m; done + mkdir -p "${DESTDIR}${MANPREFIX}/man5" + cp -f ${MAN5} "${DESTDIR}${MANPREFIX}/man5" + for m in $(MAN5); do chmod 644 "${DESTDIR}${MANPREFIX}/man5/$$m"; done uninstall: # removing executable files and scripts. - for f in $(BIN) $(SCRIPTS); do rm -f ${DESTDIR}${PREFIX}/bin/$$f; done + for f in $(BIN) $(SCRIPTS); do rm -f "${DESTDIR}${PREFIX}/bin/$$f"; done # removing example files. rm -f \ - ${DESTDIR}${PREFIX}/share/${NAME}/sfeedrc.example\ - ${DESTDIR}${PREFIX}/share/${NAME}/style.css\ - ${DESTDIR}${PREFIX}/share/${NAME}/README\ - ${DESTDIR}${PREFIX}/share/${NAME}/README.xml - -rmdir ${DESTDIR}${PREFIX}/share/${NAME} + "${DESTDIR}${PREFIX}/share/${NAME}/sfeedrc.example"\ + "${DESTDIR}${PREFIX}/share/${NAME}/style.css"\ + "${DESTDIR}${PREFIX}/share/${NAME}/README"\ + "${DESTDIR}${PREFIX}/share/${NAME}/README.xml" + -rmdir "${DESTDIR}${PREFIX}/share/${NAME}" # removing manual pages. - for m in $(MAN1); do rm -f ${DESTDIR}${MANPREFIX}/man1/$$m; done - for m in $(MAN5); do rm -f ${DESTDIR}${MANPREFIX}/man5/$$m; done + for m in $(MAN1); do rm -f "${DESTDIR}${MANPREFIX}/man1/$$m"; done + for m in $(MAN5); do rm -f "${DESTDIR}${MANPREFIX}/man5/$$m"; done .PHONY: all clean dist install uninstall -- cgit v1.2.3