From 97312778a09decf65030e994e72ce07434ce0f07 Mon Sep 17 00:00:00 2001 From: merakor Date: Thu, 4 Feb 2021 14:30:43 +0000 Subject: cpt: switch back to 'make' FossilOrigin-Name: 048c099fa4155f31725c51c27b09359d7b04f4c2d7e64f2a2b381ab7dea7803d --- docs/Makefile | 33 +++++++++++++++++++++++++++++++++ docs/default.do | 33 --------------------------------- 2 files changed, 33 insertions(+), 33 deletions(-) create mode 100644 docs/Makefile delete mode 100644 docs/default.do (limited to 'docs') diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..92b2c76 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,33 @@ +# Carbs Packaging Tools Documentation +include ../config.mk +INSTALL_SH = ../tools/install.sh + +all: cpt.txt cpt.texi cpt.info + +.SUFFIXES: .info .texi .org .txt +.org.texi: + rm -f $@ + ${EMACS} $< --batch --eval "(require 'vc)" -f org-texinfo-export-to-texinfo + +.texi.info: + ${MAKEINFO} $< -o $@ + +.org.txt: + rm -f $@ + ${EMACS} $< --batch --eval "(require 'vc)" -f org-ascii-export-to-ascii + +clean: + rm -f cpt.info + +all-clean: clean + rm -f cpt.texi cpt.txt + +install: all + ${INSTALL_SH} -Dm644 cpt.txt ${DESTDIR}${CPTDOC}/cpt.txt + ${INSTALL_SH} -Dm644 cpt.info ${DESTDIR}${INFODIR}/cpt.info + +uninstall: + rm -rf ${DESTDIR}${CPTDOC} + rm -f ${DESTDIR}${INFODIR}/cpt.info + +.PHONY: all clean all-clean install uninstall diff --git a/docs/default.do b/docs/default.do deleted file mode 100644 index fcf8802..0000000 --- a/docs/default.do +++ /dev/null @@ -1,33 +0,0 @@ -SRC_ROOT=.. -. ../config.rc - -# Extensionless name of file -fn="${1%.*}" - -case "$1" in - all) redo info ;; - allclean) redo ../clean; rm -f cpt.texi ;; - info) redo-ifchange cpt.info cpt.texi cpt.org ;; - *.info) - # Don't bother if makeinfo doesn't exist on the system, exit with success. - if ! command -v $MAKEINFO >/dev/null; then - PHONY - exit 0 - fi - redo-ifchange "$fn.texi" - $MAKEINFO "$fn.texi" -o "$3" - ;; - *.texi) - [ -f "$fn.org" ] || exit 0 - redo-ifchange "$fn.org" - cp "$fn.org" "$3.org" - $EMACS "$3.org" --batch -f org-texinfo-export-to-texinfo - rm -f "$3.org" - mv "$3.texi" "$3" - ;; - *) - echo "Unknown target $1" - exit 99 -esac - -PHONY all info html -- cgit v1.2.3