docs

Carbs Linux Documentation
git clone git://git.carbslinux.org/docs
Log | Files | Refs | Submodules | README

commit 53e4b3243664705ad1ac5c6223f13877bf849f96
parent fdebe8e585426ec55012108bcb16a2f16b044bd8
Author: Cem Keylan <cem@ckyln.com>
Date:   Mon, 14 Sep 2020 19:58:02 +0300

Makefile: create proper Makefile meant to distribute itself.

Diffstat:
MMakefile | 39++++++++++++++++++++++++++++-----------
DextMakefile | 13-------------
2 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/Makefile b/Makefile @@ -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 diff --git a/extMakefile b/extMakefile @@ -1,13 +0,0 @@ -PREFIX=/usr/local -SHAREDIR=${PREFIX}/share -INFODIR=${SHAREDIR}/info -DOCDIR=${SHAREDIR}/doc - -all: - @echo run make install - -install: - install -Dm644 carbslinux.info ${DESTDIR}${INFODIR}/carbslinux.info - install -Dm644 carbslinux.txt ${DESTDIR}${DOCDIR}/carbslinux.txt - -.PHONY: all install