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
|
SHELL=/bin/bash
pkgdocdir=/usr/share/gap/pkg/HAP/doc
DOCDIR=$(DESTDIR)$(pkgdocdir)
MANUAL=*Hap*
DIRS={.,../tutorial}
clean:
rm -f $(DIRS)/*.{html,txt,css,js}
rm -f $(DIRS)/make_manuals.out $(DIRS)/mathjax
rm -f $(DIRS)/$(MANUAL).{aux,bbl,blg,brf,idx,ilg,ind,log,out,pnr,tex,toc,toc.gz}
rm -f $(DIRS)/manual{,-bw}.{lab,six,six.gz,pdf}
rm -f manualbib.xml.bib
rm -f ../tutorial/mybib.xml.bib
install: install-pdf install-help install-html
mk-dest-dirs:
set -e; shopt -s nullglob; \
for DIR in $(DOCDIR)/$(DIRS); do \
test -d $$DIR || install -d $$DIR; \
done
test -d $(DOCDIR)/../tutorial/images || install -d $(DOCDIR)/../tutorial/images
install-pdf: mk-dest-dirs
set -e; for man in $(DIRS); do \
install -m 0644 $$man/manual.pdf $(DOCDIR)/$$man;\
done
install-help: mk-dest-dirs
set -e; shopt -s nullglob; for man in $(DIRS); do \
gzip --best --no-name $$man/manual.six; \
gzip --best --no-name $$man/$(MANUAL).toc; \
install -m 0644 $$man/$(MANUAL).toc.gz $(DOCDIR)/$$man/; \
install -m 0644 $$man/manual.six.gz $(DOCDIR)/$$man/; \
install -m 0644 $$man/*.txt $(DOCDIR)/$$man/; \
done
install -m 0644 ../tutorial/mybib.xml $(DOCDIR)/../tutorial/;
install -m 0644 ../tutorial/mybib.xml.bib $(DOCDIR)/../tutorial/;
install-html: mk-dest-dirs
set -e; for man in $(DIRS); do \
install -m 0644 $$man/*.{html,css,js} $(DOCDIR)/$$man;\
ln -s `readlink mathjax` $(DOCDIR)/$$man/mathjax;\
done
install -m 0644 ../tutorial/images/* $(DOCDIR)/../tutorial/images/;
.PHONY: clean install install-pdf install-help install-html
|