aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2021-07-28 08:27:35 +0000
committermerakor <cem@ckyln.com>2021-07-28 08:27:35 +0000
commit0ded82fa18a6ebb1acf1e0d0d3a22f2dda8697fe (patch)
treec52ee6829c2e8c6d2ca60b4e2b72508602978d61 /Makefile
parentc02e4b71708276fd811d66c5e898952a9b54c782 (diff)
parent74c675e3d1528c0b78dd7a79408622f43bdba587 (diff)
downloadcpt-0ded82fa18a6ebb1acf1e0d0d3a22f2dda8697fe.tar.gz
merge configure
FossilOrigin-Name: ffa730cb9ecfd753f5e2131d2213201cf6531a3584d3b1e644e3f5749b049a29
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 14 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 3b49aaf..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" \
@@ -32,6 +33,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,15 +45,19 @@ 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
-.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