aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile39
-rw-r--r--extMakefile13
2 files changed, 28 insertions, 24 deletions
diff --git a/Makefile b/Makefile
index fff2442..5967622 100644
--- 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
deleted file mode 100644
index 61e61fb..0000000
--- a/extMakefile
+++ /dev/null
@@ -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