LDP/LDP/builder/Makefile.docbook

58 lines
1.5 KiB
Makefile
Raw Permalink Normal View History

# I deleted my first working makefile, but it should be fast to create
# a new one here. The targets currently implemented are html,
# html_onefile, text, pdf, ps, sgml.gz, html.tar.gz
# If there are more formats that I've forgotten, please let me know
# The default target is all, which creates all possible output
# formats. As of this moment, this makefile acts on all files in the
# current directory. If you know a way of getting around that, please
# let me know.
files = `echo *.sgml | sed "s/\.sgml//g" `
all: html html_onefile text pdf ps sgml.gz html.tar.gz
html:
(for i in $(files); do \
mkdir $$i; \
cd $$i; \
jade -t sgml -i html -d \
/home/gleblanc/projects/LDP/LDP/builder/dsssl/ldp.dsl\#html \
../$$i.sgml; \
cd ..; \
done;)
html_onefile:
(for i in $(files); do \
jade -t sgml -i html -V nochunks -d \
/home/gleblanc/projects/LDP/LDP/builder/dsssl/ldp.dsl\#html \
$$i.sgml > 00_$$i.html;\
done; )
text: html_onefile
(for i in $(files); do \
lynx -dump 00_$$i.html > $$i.txt; \
done; )
pdf: html_onefile
(for i in $(files); do \
htmldoc --size universal -t pdf -f $$i.pdf 00_$$i.html; \
done; )
ps: html_onefile
(for i in $(files); do \
htmldoc --size universal -t pdf -f $$i.ps 00_$$i.html; \
done; )
sgml.gz:
(for i in $(files); do \
cp $$i.sgml ldp_mk_tmp; \
gzip -f ldp_mk_tmp; \
mv -f ldp_mk_tmp.gz $$i.sgml.gz;\
done; )
html.tar.gz: html
(for i in $(files); do \
tar -cf $$i.tar $$i; \
gzip -f $$i.tar; \
done; )