From 81d1d9a6bdca779a44f931730b866eea75777c00 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Sat, 9 Oct 2010 16:00:47 -0700 Subject: [PATCH] docs: Remove directory prerequisites from make rules Make expects prerequisites to be files with valid timestamps, and directories are treated as always being out of date. Thus, any targets depending on directories will always be rebuilt. Instead, the doc rules are changed to always create the target's leading directory. This should prevent the documentation from being rebuilt when "make install" is run. Signed-off-by: Dan Nicholson Reviewed-by: Jeremy Huddleston Signed-off-by: Alan Coopersmith --- cpprules.in | 1 + nls/Makefile.am | 14 +++----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/cpprules.in b/cpprules.in index 127464d9..fca0ab39 100644 --- a/cpprules.in +++ b/cpprules.in @@ -26,4 +26,5 @@ CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ -e '/\@\@$$/s/\@\@$$/\\/' .pre: + @$(MKDIR_P) $(@D) $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ diff --git a/nls/Makefile.am b/nls/Makefile.am index 1f40b127..470a0487 100644 --- a/nls/Makefile.am +++ b/nls/Makefile.am @@ -1,3 +1,4 @@ + x11localedir = $(X11_LOCALEDATADIR) specdir = $(docdir)/Compose @@ -101,13 +102,11 @@ locale.dir: locale.dir.pre if HAVE_PERL doc_sources = Compose/index.xml -Compose/index.xml: Compose +Compose/index.xml: + @$(MKDIR_P) $(@D) $(AM_V_GEN)$(PERL) $(srcdir)/compose-chart.pl \ --index --output="$@" $(locales) -Compose: - $(MKDIR_P) $@ - clean-local: clean-Compose-dir clean-Compose-dir: -rm -rf Compose @@ -122,11 +121,6 @@ nobase_x11locale_DATA = $(locales:%=%/XLC_LOCALE) $(locales:%=%/Compose) EXTRA_DIST += $(nobase_x11locale_DATA:%=%.pre) CLEANFILES += $(nobase_x11locale_DATA) -$(nobase_x11locale_DATA): builddirs - -builddirs: - $(MKDIR_P) $(locales) - if HAVE_PERL TESTS_ENVIRONMENT = $(PERL) TESTS = $(srcdir)/compose-check.pl @@ -144,6 +138,4 @@ XMLTO_FLAGS += -o $(@D) Compose/%.xml: %/Compose.xml $(AM_V_GEN)cp $< $@ -$(doc_sources): Compose - endif HAVE_PERL