2012-01-02 14:07:04 -05:00
|
|
|
.SUFFIXES: # we don't need default suffix rules
|
2011-07-17 08:49:43 -04:00
|
|
|
ifeq ($(MAKELEVEL), 0)
|
|
|
|
$(error This make needs to be started as a sub-make from the toplevel directory.)
|
|
|
|
endif
|
2012-04-21 10:55:57 -04:00
|
|
|
.PHONY: all info html pdf card manual guide install \
|
2012-04-30 15:37:57 -04:00
|
|
|
clean cleanall clean-install
|
2011-07-17 08:49:43 -04:00
|
|
|
|
2012-04-22 02:22:31 -04:00
|
|
|
all: $(ORG_MAKE_DOC)
|
2011-07-17 08:49:43 -04:00
|
|
|
|
|
|
|
info: org
|
|
|
|
|
|
|
|
html: org.html
|
|
|
|
|
|
|
|
pdf: org.pdf orgguide.pdf
|
|
|
|
|
|
|
|
card: orgcard.pdf orgcard_letter.pdf orgguide.pdf
|
|
|
|
|
|
|
|
manual guide::
|
|
|
|
$(RMR) $@ ; $(MKDIR) $@
|
|
|
|
manual:: org.texi
|
|
|
|
$(TEXI2HTML) -o $@ $<
|
|
|
|
../UTILITIES/mansplit.pl $@/*
|
|
|
|
guide:: orgguide.texi
|
|
|
|
$(TEXI2HTML) -o $@ $<
|
|
|
|
../UTILITIES/guidesplit.pl $@/*
|
|
|
|
|
2012-04-30 15:37:57 -04:00
|
|
|
org-version.inc: org.texi
|
2012-04-21 09:10:30 -04:00
|
|
|
@echo "org-version: $(ORGVERSION) ($(GITVERSION))"
|
2012-04-16 13:35:55 -04:00
|
|
|
@echo "@c automatically generated, do not edit" > org-version.inc
|
|
|
|
@echo "@set VERSION $(ORGVERSION) ($(GITVERSION))" >> org-version.inc
|
|
|
|
@echo "@set DATE $(DATE)" >> org-version.inc
|
2011-10-28 04:33:15 -04:00
|
|
|
|
2011-07-17 08:49:43 -04:00
|
|
|
|
|
|
|
install: org
|
2012-01-02 14:07:04 -05:00
|
|
|
if [ ! -d $(DESTDIR)$(infodir) ]; then $(MKDIR) $(DESTDIR)$(infodir); else true; fi ;
|
|
|
|
$(CP) org $(DESTDIR)$(infodir)
|
|
|
|
$(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) org
|
2011-07-17 08:49:43 -04:00
|
|
|
|
2011-07-18 15:05:52 -04:00
|
|
|
clean:
|
2012-04-30 15:37:57 -04:00
|
|
|
$(RM) org *.pdf *.html *_letter.tex org-version.inc \
|
2011-07-17 08:49:43 -04:00
|
|
|
*.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs \
|
2012-04-30 15:37:57 -04:00
|
|
|
*.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
|
2011-07-18 15:05:52 -04:00
|
|
|
cleanall: clean
|
|
|
|
$(RMR) guide manual
|
2011-07-17 08:49:43 -04:00
|
|
|
|
2011-07-18 11:55:23 -04:00
|
|
|
clean-install:
|
2012-01-02 14:07:04 -05:00
|
|
|
$(RM) $(DESTDIR)$(infodir)/org*
|
|
|
|
$(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) --remove org
|
2011-07-18 11:55:23 -04:00
|
|
|
|
2011-07-17 08:49:43 -04:00
|
|
|
.SUFFIXES: .texi .tex .txt
|
|
|
|
|
2012-04-21 09:10:30 -04:00
|
|
|
%: %.texi org-version.inc
|
2011-07-17 08:49:43 -04:00
|
|
|
$(MAKEINFO) --no-split $< -o $@
|
|
|
|
|
|
|
|
%.pdf: LC_ALL=C # work around a bug in texi2dvi
|
|
|
|
%.pdf: LANG=C # work around a bug in texi2dvi
|
2012-04-21 09:10:30 -04:00
|
|
|
%.pdf: %.texi org-version.inc
|
2011-07-17 08:49:43 -04:00
|
|
|
$(TEXI2PDF) $<
|
|
|
|
%.pdf: %.tex
|
|
|
|
PDFLATEX=$(PDFTEX) $(TEXI2PDF) $<
|
|
|
|
|
2012-04-21 09:10:30 -04:00
|
|
|
%.html: %.texi org-version.inc
|
2011-07-17 08:49:43 -04:00
|
|
|
$(TEXI2HTML) --no-split -o $@ $<
|
|
|
|
../UTILITIES/manfull.pl $@
|
|
|
|
|
|
|
|
%.txt: %.tex
|
|
|
|
perl ../UTILITIES/orgcard2txt.pl $< > $@
|
|
|
|
|
|
|
|
%_letter.tex: %.tex
|
2011-10-28 04:33:15 -04:00
|
|
|
$(SED) -e 's/\\pdflayout=(0l)/\\pdflayout=(1l)/' \
|
2011-07-17 08:49:43 -04:00
|
|
|
$< > $@
|