1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
# -*-makefile-*-
# this setting seems to be wrong
#SUBDIRS=ascii html info latex literate lout man ps slide rtf
SUBDIRS=ascii html info latex lout
INSTALLFILES= CATALOG *.*
# NONSOURCE are all files which are generated by th prepare process
NONSOURCE=notations.ent target.ent
MAKE=make
MKDIR=install
MKDIROPT=-d -o root -g root -m 755
CP=cp
prepare: # prepare this dir (to be called from upper dir Makefile)
set -e; [ -f local.ent ] || \
cp local.dst local.ent
set -e; if [ "$(PARSEPROG)" = nsgmls ]; \
then sed "/HACK SGMLS/,/END HACK SGMLS/d" target.dst > target.ent; \
else cp target.dst target.ent; \
fi
install: # install (usually to be called from upper dir. Makefile)
install: e.dd+pwd
set -e; for i in $(SUBDIRS); \
do $(MAKE) e.dir DIRECTORY=$(DD)/sgml/target/$$i && \
$(CP) target/$$i/*.* $(DD)/sgml/target/$$i; \
done;
$(CP) $(INSTALLFILES) $(DD)/sgml
$(MAKE) e.dir DIRECTORY=$(DD)/sgml/target/lout/linuxdoc
$(CP) target/lout/linuxdoc/general $(DD)/sgml/target/lout/linuxdoc
ln -sf ../lout/linuxdoc $(DD)/sgml/target/ascii/linuxdoc
clean: # remove redundant files
rm -f `find . \( -name "*~" -o -name core \) -print`
clobber: # remove all generated files (did I catch all?)
clobber: clean
rm -f $(NONSOURCE)
purge: # same as clean & removes files containing only "deleted"
purge: clean
@$(ECHO) -n deleted >deleted7
@$(ECHO) deleted >deleted8
@rm -f `find . \
\( \( -size 8c -exec cmp -s {} deleted8 \; \) \
-o \( -size 7c -exec cmp -s {} deleted7 \; \) \) \
-print`
@echo purged
wipe: # use: make wipe file=<file> # prepares file for purge
mv -f $(file) $(file)~
echo deleted >$(file)
e.dd+pwd:
set -e; [ -d $(DD)/`basename \`pwd\`` ] || \
$(MKDIR) $(MKDIROPT) $(DD)/`basename \`pwd\``
e.dir:
set -e; [ -d $(DIRECTORY) ] || \
$(MKDIR) $(MKDIROPT) $(DIRECTORY)
testdir:
help: # Help on make targets
@echo Warning! Targets in this Makefile are intented to be called
@echo from the Makefile in the upper directory!
@echo ------------------------------
-@egrep "^[A-Za-z\._]+::?.*#" [Mm]akefile
|