1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-24 07:02:30 +01:00
Files
wmaker/doc/build/Makefile.am
Christophe CURIS 842e145e0a doc: re-generate the top directory documentation when "make dist" is invoked
As pointed by Douglas Torrance, there are some case where the 2 docs
INSTALL-WMAKER and README.i18n are not re-generated properly, one of the
cases being if the user grabs the sources from Git to make a source package
only (ie, without compiling anything).

This patch adds a hook to "make dist" so it will re-generate the docs if
needed. Because the "dist-hook" is run after Automake has copied the files
to the temporary directory (distdir) then we also include an explicit copy
of the files there to have the latest version.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
2015-04-18 23:29:37 +01:00

34 lines
1.7 KiB
Makefile

# The list of sources are distributed, but none are to be
# installed along with Window Maker:
EXTRA_DIST = Readme \
Compilation.texi \
Translations.texi
# How to re-generate automatically the top-level text files
all-local: $(top_srcdir)/INSTALL-WMAKER $(top_srcdir)/README.i18n
# We also re-generate the documentation when "make dist" is used, because we cannot
# be assured that the doc currently present in the directory is up-to-date, for example
# if the user did not run "make (all)" for valid reason
dist-hook: $(top_srcdir)/INSTALL-WMAKER $(top_srcdir)/README.i18n
cp -f $(top_srcdir)/INSTALL-WMAKER $(top_distdir)/INSTALL-WMAKER
cp -f $(top_srcdir)/README.i18n $(top_distdir)/README.i18n
$(top_srcdir)/INSTALL-WMAKER: $(srcdir)/Compilation.texi $(top_srcdir)/script/generate-txt-from-texi.sh
$(AM_V_GEN)if test ! -e "$(top_srcdir)/INSTALL-WMAKER" -o -w "$(top_srcdir)/INSTALL-WMAKER" ; then \
$(top_srcdir)/script/generate-txt-from-texi.sh \
$(srcdir)/Compilation.texi -o $(top_srcdir)/INSTALL-WMAKER \
-Dversion="$(PACKAGE_VERSION)" -e "$(PACKAGE_BUGREPORT)" ; \
else \
echo "Warning: \"$(top_srcdir)/INSTALL-WMAKER\" is not writeable, not regenerated" ; \
fi
$(top_srcdir)/README.i18n: $(srcdir)/Translations.texi $(top_srcdir)/script/generate-txt-from-texi.sh
$(AM_V_GEN)if test ! -e "$(top_srcdir)/README.i18n" -o -w "$(top_srcdir)/README.i18n" ; then \
$(top_srcdir)/script/generate-txt-from-texi.sh \
$(srcdir)/Translations.texi -o $(top_srcdir)/README.i18n \
-Dversion="$(PACKAGE_VERSION)" -e "$(PACKAGE_BUGREPORT)" ; \
else \
echo "Warning: \"$(top_srcdir)/README.i18n\" is not writeable, not regenerated" ; \
fi