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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
|
# Settings
######################################
TOPDIR=../ion-3
include $(TOPDIR)/build/system-inc.mk
L2H=latex2html -show_section_numbers -short_index -local_icons -noaddress \
-up_url http://iki.fi/tuomov/ion/ -up_title "Ion homepage" -nofootnode\
## -style greyviolet.css
# Function documentation to build
######################################
DOCS=ionconf ionnotes
FNTEXES=ioncore.exports mod_tiling.exports \
mod_query.exports de.exports mod_menu.exports \
mod_dock.exports mod_sp.exports mod_statusbar.exports
RUBBER_DVI=rubber
RUBBER_PS=rubber -p
RUBBER_PDF=rubber -d
TARGETS = ionconf ionnotes
# Generic rules
######################################
nothing:
@ echo "Please read the README first."
%-dvi:
$(RUBBER_DVI) $*
%-ps:
$(RUBBER_PS) $*
%-pdf:
$(RUBBER_PDF) $*
# Install
######################################
install:
$(INSTALLDIR) $(DOCDIR); \
for d in $(DOCS); do \
for e in ps pdf dvi; do \
test -f $$d.$$e && $(INSTALL) -m $(DATA_MODE) $$d.$$e $(DOCDIR); \
done; \
$(INSTALLDIR) $(DOCDIR)/$$d; \
for i in $$d/*; do \
$(INSTALL) -m $(DATA_MODE) $$i $(DOCDIR)/$$i; \
done; \
done
# ionconf rules
######################################
ionconf-dvi: fnlist.tex
ionconf-ps: fnlist.tex
ionconf-pdf: fnlist.tex
ionconf-html: $(FNTEXES)
$(L2H) -split 3 ionconf
# ionnotes rules
######################################
ionnotes-html:
$(L2H) -split 4 ionnotes
# More generic rules
######################################
.PHONY: all all-dvi all-ps all-pdf all-html
all: all-dvi all-ps all-pdf all-html
all-dvi: $(patsubst %,%-dvi,$(TARGETS))
all-ps: $(patsubst %, %-ps, $(TARGETS))
all-pdf: $(patsubst %, %-pdf, $(TARGETS))
all-html: $(patsubst %, %-html, $(TARGETS))
# Clean
######################################
clean:
rm -f $(FNTEXES) fnlist.tex
rm -f *.aux *.toc *.log
rm -f *.idx *.ild *.ilg *.ind
realclean: clean
rm -f *.ps *.pdf *.dvi
rm -rf $(DOCS)
# Function reference rules
######################################
include $(TOPDIR)/libmainloop/rx.mk
$(TOPDIR)/%/exports.tex:
$(MAKE) -C $$(dirname $@) _exports_doc
%.exports: $(TOPDIR)/%/exports.tex
cp $< $@
# Function list
######################################
fnlist.tex: $(FNTEXES)
grep hyperlabel $+ | \
sed 's/.*fn:\([^}]*\).*/\\fnlisti{\1}/;'|sort -d -f \
> $@
|