[gjs] build: Enable silent rules for generated files



commit 35975d69d6d506230a28db2758d929539fd5ff39
Author: Philip Chimento <philip chimento gmail com>
Date:   Thu Sep 29 12:47:24 2016 -0700

    build: Enable silent rules for generated files
    
    We have several files that must be processed by make-time sed scripts.
    Make nicer build logs by using AM_V_GEN to enable silent rules for these.
    
    Also make sure the directories exist before the files are placed into
    them. This is usually not a problem, but will bite you on a clean
    checkout with builddir != srcdir.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=772027

 Makefile-insttest.am |    7 ++++++-
 Makefile.am          |    1 +
 configure.ac         |    3 +++
 3 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/Makefile-insttest.am b/Makefile-insttest.am
index 1003b0c..7913bce 100644
--- a/Makefile-insttest.am
+++ b/Makefile-insttest.am
@@ -12,6 +12,7 @@ installedtestmeta_DATA += jsunit.test
 endif
 
 jsunit.test: installed-tests/jsunit.test.in Makefile
+       $(AM_V_GEN)$(MKDIR_P) $(@D) && \
        sed -e s,@pkglibexecdir\@,$(pkglibexecdir), < $< > $@.tmp && mv $@.tmp $@
 
 gjsinsttestdir = $(pkglibexecdir)/installed-tests
@@ -168,7 +169,11 @@ dist_jstests_DATA += installed-tests/js/testCairo.js
 endif
 
 %.test: installed-tests/scripts/%.js installed-tests/script.test.in Makefile
-       sed -e s,@pkglibexecdir\@,$(pkglibexecdir), -e s,@name\@,$(notdir $<), < 
$(srcdir)/installed-tests/script.test.in > $@.tmp && mv $@.tmp $@
+       $(AM_V_GEN)$(MKDIR_P) $(@D) && \
+       sed -e s,@pkglibexecdir\@,$(pkglibexecdir), \
+               -e s,@name\@,$(notdir $<), \
+               < $(srcdir)/installed-tests/script.test.in > $@.tmp && \
+       mv $@.tmp $@
 
 jsscripttestsdir = $(gjsinsttestdir)/scripts
 dist_jsscripttests_DATA = installed-tests/scripts/testSystemExit.js
diff --git a/Makefile.am b/Makefile.am
index 1f0b1f4..279aaf8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -197,6 +197,7 @@ tapset_in_files = gjs/gjs.stp.in
 EXTRA_DIST += $(tapset_in_files)
 if ENABLE_SYSTEMTAP
 gjs/gjs.stp: gjs/gjs.stp.in Makefile
+       $(AM_V_GEN)$(MKDIR_P) $(@D) && \
        sed -e s,@EXPANDED_LIBDIR@,$(libdir), < $< > $@.tmp && mv $@.tmp $@
 tapsetdir   = $(DESTDIR)$(datadir)/systemtap/tapset
 tapset_DATA = $(tapset_in_files:.stp.in=.stp)
diff --git a/configure.ac b/configure.ac
index 1e2df25..98f94a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,9 @@ LT_PREREQ([2.2.0])
 # no stupid static libraries
 LT_INIT([disable-static])
 
+# Other programs
+AC_PROG_MKDIR_P
+
 GNOME_CXX_WARNINGS([maximum])
 
 # coverage


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]