From 95563d3a1893135d31e6f0df1d7e60acd2a547bb Mon Sep 17 00:00:00 2001 From: merakor Date: Tue, 27 Jul 2021 12:20:28 +0000 Subject: cpt: add configure script FossilOrigin-Name: 2d0418f9f5660ac4e46b70bf111ef29878a1ef9dd8af98b6b6ed16577dd93f5e --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3b49aaf..81a06a0 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,10 @@ dist: docs/cpt.info install: all test "${DOCS}" != yes || ${MAKE} -C docs install + [ -f docs/cpt.info ] && \ + ${INSTALL_SH} -Dm644 docs/cpt.info -t ${DESTDIR}${INFODIR} + [ -f docs/cpt.txt ] && \ + ${INSTALL_SH} -Dm644 docs/cpt.txt -t ${DESTDIR}${DOCDIR} ${INSTALL_SH} -Dm755 -t ${DESTDIR}${BINDIR} ${BIN} ${INSTALL_SH} -Dm644 -t ${DESTDIR}${MAN1} man/*.1 for man in ${CONTRIB}; do \ @@ -40,14 +44,15 @@ install: all done uninstall: - test "${DOCS}" != yes || ${MAKE} -C docs uninstall for bin in ${BIN}; do \ rm -f ${DESTDIR}${BINDIR}/$${bin##*/}; done for man in man/*.1; do rm -f ${DESTDIR}${MAN1}/$${man##*/}; done for man in ${CONTRIB}; do rm -f ${DESTDIR}${MAN1}/$${man##*/}.1; done + rm -rf ${DESTDIR}${DOCDIR} + rm -f ${DESTDIR}${INFODIR}/cpt.info clean: - test "${DOCS}" != yes || ${MAKE} -C docs clean + ${MAKE} -C docs clean rm -rf src/cpt-lib "cpt-${VERSION}.tar.xz" coverage report rm -f tests/etc/cpt-hook -- cgit v1.2.3 From 74c675e3d1528c0b78dd7a79408622f43bdba587 Mon Sep 17 00:00:00 2001 From: merakor Date: Tue, 27 Jul 2021 21:36:59 +0000 Subject: Makefile: update targets FossilOrigin-Name: ee0d6bb03d2647fb825ec9b1b153dc54f9f75e100e0adda72f843604d1ee1c6c --- Makefile | 10 +++++++--- docs/Makefile | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 81a06a0..5cb62c1 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Carbs Packaging Tools -include config.mk +-include config.mk INSTALL_SH = ./tools/install.sh CONTRIB = `find contrib -name 'cpt*' ! -name '*.*'` @@ -9,7 +9,8 @@ LIB = src/cpt-lib LIB_IN = ${LIB:=.in} all: src/cpt-lib - test "${DOCS}" != yes || ${MAKE} -C docs all + @if ! [ -e config.mk ]; then echo "Please run './configure'"; exit 1; fi + @test "${DOCS}" != yes || ${MAKE} -C docs all src/cpt-lib: src/cpt-lib.in sed -e "s|@VERSION@|${VERSION}|g" \ @@ -56,4 +57,7 @@ clean: rm -rf src/cpt-lib "cpt-${VERSION}.tar.xz" coverage report rm -f tests/etc/cpt-hook -.PHONY: all dist clean install uninstall shellspec shellcheck test +allclean: clean + rm -f config.mk + +.PHONY: all dist allclean clean install uninstall shellspec shellcheck test diff --git a/docs/Makefile b/docs/Makefile index 12231d2..3a7dbf0 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,5 +1,5 @@ # Carbs Packaging Tools Documentation -include ../config.mk +-include ../config.mk INSTALL_SH = ../tools/install.sh all: cpt.txt cpt.texi cpt.info -- cgit v1.2.3