[glibmm] Work around Automake cleverness failure



commit 464e1e45a2f6ef0fefa4dadd6eaa12689770c2b1
Author: Daniel Elstner <danielk openismus com>
Date:   Sun Aug 9 22:59:13 2009 +0200

    Work around Automake cleverness failure
    
    * gio/giomm/filelist.am (giomm_files_built_ph): Use the GNU
    make $(patsubst ...) function instead of $(var:%=foo%bar) if
    a simple $(var:.a=.b) is not sufficient.  Apparently Automake
    is able to expand some of these constructs statically, but in
    some cases it will actually produce the wrong result.  Using
    $(patsubst ...) helps to avoid the problem because Automake
    does not attempt to expand it.
    * glib/glibmm/filelist.am (glibmm_files_built_ph): Use the
    $(patsubst ...) function here, too.
    * gio/src/filelist.am (giomm_files_used_hg): Define another
    intermediate variable to avoid repetition.

 ChangeLog               |   16 ++++++++++++++++
 gio/giomm/filelist.am   |    9 ++++-----
 gio/src/filelist.am     |    1 +
 glib/glibmm/filelist.am |    2 +-
 4 files changed, 22 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4b5d3a7..cde128c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
 2009-08-09  Daniel Elstner  <danielk openismus com>
 
+	Work around Automake cleverness failure
+
+	* gio/giomm/filelist.am (giomm_files_built_ph): Use the GNU
+	make $(patsubst ...) function instead of $(var:%=foo%bar) if
+	a simple $(var:.a=.b) is not sufficient.  Apparently Automake
+	is able to expand some of these constructs statically, but in
+	some cases it will actually produce the wrong result.  Using
+	$(patsubst ...) helps to avoid the problem because Automake
+	does not attempt to expand it.
+	* glib/glibmm/filelist.am (glibmm_files_built_ph): Use the
+	$(patsubst ...) function here, too.
+	* gio/src/filelist.am (giomm_files_used_hg): Define another
+	intermediate variable to avoid repetition.
+
+2009-08-09  Daniel Elstner  <danielk openismus com>
+
 	Get rid of all Makefile.am in the MSVC dirs
 
 	* MSVC_Net2005/**/Makefile.am: Delete recursive build files.
diff --git a/gio/giomm/filelist.am b/gio/giomm/filelist.am
index 541947d..ceee372 100644
--- a/gio/giomm/filelist.am
+++ b/gio/giomm/filelist.am
@@ -1,10 +1,9 @@
 ## This file is part of glibmm.
 
-giomm_files_built_cc = $(giomm_files_any_hg:.hg=.cc) $(giomm_files_arch_hg:.hg=.cc) wrap_init.cc
-giomm_files_built_h  = $(giomm_files_any_hg:.hg=.h) $(giomm_files_arch_hg:.hg=.h)
-giomm_files_built_ph = $(giomm_files_any_hg:%.hg=private/%_p.h)	\
-                       $(giomm_files_arch_hg:%.hg=private/%_p.h)
+giomm_files_built_cc = $(giomm_files_used_hg:.hg=.cc) wrap_init.cc
+giomm_files_built_h  = $(giomm_files_used_hg:.hg=.h)
+giomm_files_built_ph = $(patsubst %.hg,private/%_p.h,$(giomm_files_used_hg))
 
 giomm_files_extra_cc = contenttype.cc init.cc slot_async.cc
-giomm_files_extra_h  = contenttype.h init.h
+giomm_files_extra_h  = contenttype.h init.h wrap_init.h
 giomm_files_extra_ph =
diff --git a/gio/src/filelist.am b/gio/src/filelist.am
index f07b316..9de60ff 100644
--- a/gio/src/filelist.am
+++ b/gio/src/filelist.am
@@ -71,6 +71,7 @@ giomm_files_arch_hg =
 else
 giomm_files_arch_hg = $(giomm_files_posix_hg)
 endif
+giomm_files_used_hg = $(giomm_files_any_hg) $(giomm_files_arch_hg)
 
 giomm_files_hg  = $(giomm_files_any_hg) $(giomm_files_posix_hg)
 giomm_files_ccg = $(giomm_files_hg:.hg=.ccg)
diff --git a/glib/glibmm/filelist.am b/glib/glibmm/filelist.am
index 74d3cf0..ccc7202 100644
--- a/glib/glibmm/filelist.am
+++ b/glib/glibmm/filelist.am
@@ -2,7 +2,7 @@
 
 glibmm_files_built_cc = $(glibmm_files_hg:.hg=.cc) $(glibmm_files_cc_m4:.m4=) wrap_init.cc
 glibmm_files_built_h  = $(glibmm_files_hg:.hg=.h) $(glibmm_files_h_m4:.m4=)
-glibmm_files_built_ph = $(glibmm_files_hg:%.hg=private/%_p.h)
+glibmm_files_built_ph = $(patsubst %.hg,private/%_p.h,$(glibmm_files_hg))
 
 glibmm_files_extra_cc =			\
 	class.cc			\



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