diff options
author | Cem Keylan <cem@ckyln.com> | 2020-09-14 19:58:02 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-09-14 19:58:02 +0300 |
commit | 53e4b3243664705ad1ac5c6223f13877bf849f96 (patch) | |
tree | 7959c804a452dd7f1cc8ef82b8dcebfa6dfa3e02 /Makefile | |
parent | fdebe8e585426ec55012108bcb16a2f16b044bd8 (diff) | |
download | docs-53e4b3243664705ad1ac5c6223f13877bf849f96.tar.gz |
Makefile: create proper Makefile meant to distribute itself.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 39 |
1 files changed, 28 insertions, 11 deletions
@@ -1,22 +1,39 @@ # This Makefile is meant to generate a dist tarball in order to avoid installing # texinfo on the target system. -TARBALL=carbs-docs-`date +%Y-%m-%d` -DESTDIR=./docs +PREFIX = /usr/local +SHAREDIR = ${PREFIX}/share +INFODIR = ${SHAREDIR}/info +DOCDIR = ${SHAREDIR}/doc +TARBALL = carbs-docs-`date +%Y%m%d` +DESTDIR = ./carbslinux +TEXI = contribution.texi cpt.texi init.texi install.texi top.texi +OBJ = carbslinux.info carbslinux.txt -all: +all: ${OBJ} -dist: +clean: + rm -f ${OBJ} ${TARBALL}.tar.gz + +carbslinux.txt: ${TEXI} + makeinfo --plaintext top.texi -o carbslinux.txt + +carbslinux.info: ${TEXI} + makeinfo top.texi -o carbslinux.info + +dist: ${OBJ} mkdir -p ${TARBALL} - makeinfo -o ${TARBALL}/carbslinux.info top.texi - makeinfo --plaintext top.texi > ${TARBALL}/carbslinux.txt - cp extMakefile ${TARBALL}/Makefile + cp ${OBJ} ${TEXI} Makefile README ${TARBALL} tar -cf ${TARBALL}.tar ${TARBALL} gzip -9 ${TARBALL}.tar - rm -rf ${TARBALL}.tar ${TARBALL} + rm -rf ${TARBALL}.tar ${TARBALL} -htmldocs: - rm -rf -- ${DESTDIR} +htmldocs: ${OBJ} + rm -f -- ${DESTDIR}/* makeinfo --html -o ${DESTDIR} top.texi makeinfo --plaintext -o ${DESTDIR}/install.txt install.texi -.PHONY: all dist htmldocs +install: carbslinux.info carbslinux.txt + install -Dm644 carbslinux.info ${DESTDIR}${INFODIR}/carbslinux.info + install -Dm644 carbslinux.txt ${DESTDIR}${DOCDIR}/carbslinux.txt + +.PHONY: all dist htmldocs install clean |