[latexrefman-commits] r327 - /trunk/Makefile
karl at domain.hid
karl at domain.hid
Thu May 7 20:31:54 CEST 2015
Author: karl
Date: Thu May 7 20:31:53 2015
New Revision: 327
URL: http://svn.gna.org/viewcvs/latexrefman?rev=327&view=rev
Log:
simplify Makefile again
Modified:
trunk/Makefile
Modified: trunk/Makefile
URL: http://svn.gna.org/viewcvs/latexrefman/trunk/Makefile?rev=327&r1=326&r2=327&view=diff
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Thu May 7 20:31:53 2015
@@ -2,88 +2,85 @@
# Public domain. Originally written 2006, Karl Berry.
# Makefile for latexrefman.
-manual = latex2e
-default_language = en
-other_languages = es fr
-# Everything after this is generic.
+en_tex_output = latex2e.dvi latex2e.pdf
+es_tex_output = latex2e-es.dvi latex2e-es.pdf
+fr_tex_output = latex2e-fr.dvi latex2e-fr.pdf
+tex_output = $(en_tex_output) $(es_tex_output) $(fr_tex_output)
+#
+mi_suffixes = dbk html info txt xml
+en_mi_output = $(addprefix latex2e., $(mi_suffixes))
+es_mi_output = $(addprefix latex2e-es., $(mi_suffixes))
+fr_mi_output = $(addprefix latex2e-fr., $(mi_suffixes))
+mi_output = $(en_mi_output) $(es_mi_output) $(fr_mi_output)
+
+#
how to build.
+#
texi2dvi = texi2dvi --batch --tidy --build-dir=$*.t2dvi
texi2pdf = texi2pdf --batch --tidy --build-dir=$*.t2pdf
#
makeinfo = makeinfo
-texi2docbook = $(makeinfo) --docbook -o $@
-texi2html = $(makeinfo) --html --no-split -c TOP_NODE_UP_URL=http://tug.org/texinfohtml
+texi2docbook = $(makeinfo) --docbook
+texi2html = $(makeinfo) --html --no-split
texi2info = $(makeinfo) --no-split
-texi2txt = $(makeinfo) --plaintext --no-split -o $@
+texi2txt = $(makeinfo) --plaintext --no-split
texi2xml = $(makeinfo) --xml
%.pdf: %.texi
$(texi2pdf) $<
%.dvi: %.texi
$(texi2dvi) $<
+#
%.dbk: %.texi
- $(texi2docbook) $<
+ $(texi2docbook) -o $@ $<
%.html: %.texi
$(texi2html) $<
%.info: %.texi
$(texi2info) $<
%.txt: %.texi
- $(texi2txt) $<
+ $(texi2txt) -o $@ $<
%.xml: %.texi
$(texi2xml) $<
-es_longname:=spanish
-fr_longname:=french
-de_longname:=german
-ru_longname:=russian
-languages=$(default_language) $(other_languages)
-define lang_def_template
-$(1)_tex_output = $$(addprefix $(manual)$$(filter-out -$(default_language),-$(1)).,dvi pdf)
-$(1)_makeinfo_output = $$(addprefix $(manual)$$(filter-out -$(default_language),-$(1)).,\
- info html txt xml dbk)
-tex_output+= $$($(1)_tex_output)
-makeinfo_output+= $$($(1)_makeinfo_output)
+#
targets follow.
+#
+default: check-en
-check-$(1):= $$(addprefix $(manual)$$(filter-out -$(default_language),-$(1)),.pdf .info)
-.PHONY: check-$(1)
-check-$(1): $$(check-$(1))
+# to test changes, build a subset: html and info (since these formats
+# exercise significantly different code paths), and pdf for tex.
+check_suffixes = html info pdf
+#
+check-en: $(addprefix latex2e., $(check_suffixes))
+check-es: $(addprefix latex2e-es., $(check_suffixes))
+check-fr: $(addprefix latex2e-fr., $(check_suffixes))
+check: check-en check-es check-fr
-check+=check-$(1)
-endef
-$(foreach lang,$(languages),\
- $(eval $(call lang_def_template,$(lang))))
-all=$(makeinfo_output) $(tex_output)
-.PHONY: all
-all: makeinfo_output tex_output
+# To build everything.
+all: mi-output tex-output
+mi-output: $(mi_output)
+tex-output: $(tex_output)
-.PHONY: makeinfo_output
-makeinfo_output: $(makeinfo_output)
-.PHONY: tex_output
-tex_output: $(tex_output)
+# following the GNU sequence of clean targets.
+distclean clean mostlyclean:
+ rm -rf latex2e*.t2*
-.PHONY: mostlyclean clean
-mostlyclean clean:
- rm -rf $(manual).t2*
+realclean maintainer-clean: distclean
+ rm -f $(addprefix latex2e*., pdf dvi $(mi_suffixes))
-.PHONY: realclean squeaky distclean
-realclean distclean: clean
- rm -f $(all)
-.PHONY: check
-check: $(check)
-
-dist = $(manual)-help-texinfo.zip
-.PHONY: dist
+# We combine all into one zip for upload. Will change if the
+# translations ever become separately uploaded.
+# Don't bother including .dvi files.
+#
+dist = latex2e-help-texinfo.zip
dist: all
-# temporarilly, we do not put french to dist, as the tanslation is still ongoing
- @rm -f spanish; ln -s . spanish
-# $(foreach lang,$(other_languages), at rm -f $($(lang)_longname); ln -s . $($(lang)_longname);)
- @mkdir $(manual)-help-texinfo; cd $(manual)-help-texinfo; ln -s ../* .
+ rm -f spanish; ln -s . spanish
+ mkdir latex2e-help-texinfo && cd latex2e-help-texinfo && ln -s ../* .
zip -q $(dist) \
-$(addprefix $(manual)-help-texinfo/, ChangeLog Makefile NEWS README ltx-help.el \
- $(manual).texi $($(default_language)_makeinfo_output) $(manual).pdf) \
-$(foreach lang,$(other_languages),$(addprefix $(manual)-help-texinfo/$($(lang)_longname)/, \
- $(manual)-$(lang).texi $($(lang)_makeinfo_output) $(manual)-$(lang).pdf))
- @rm -rf $(manual)-help-texinfo $(foreach lang,$(other_languages),$($(lang)_longname))
+$(addprefix latex2e-help-texinfo/, ChangeLog Makefile NEWS README ltx-help.el \
+ latex2e.texi $(en_mi_output) latex2e.pdf) \
+$(addprefix latex2e-help-texinfo/spanish/, \
+ latex2e-es.texi $(es_mi_output) latex2e-es.pdf)
+ rm -rf latex2e-help-texinfo spanish
@ls -l $(dist); unzip -t $(dist)
More information about the latexrefman-commits
mailing list