[PATCH] clean up the rules for compiling *-marshal.list
Stepan Kasal
skasal at redhat.com
Tue Feb 19 08:24:36 PST 2008
---
libgbus/Makefile.am | 36 +++++++++++++++---------------------
libpackagekit/Makefile.am | 38 ++++++++++++++++----------------------
2 files changed, 31 insertions(+), 43 deletions(-)
diff --git a/libgbus/Makefile.am b/libgbus/Makefile.am
index f0444b6..1e3de02 100644
--- a/libgbus/Makefile.am
+++ b/libgbus/Makefile.am
@@ -9,34 +9,28 @@ noinst_LTLIBRARIES = \
libgbus.la
libgbus_la_SOURCES = \
- libgbus-marshal.h \
- libgbus-marshal.c \
+ libgbus-marshal.list \
libgbus.c \
libgbus.h
libgbus_la_LIBADD = @DBUS_LIBS@ $(INTLLIBS) $(GLIB_LIBS)
-EXTRA_DIST = \
- libgbus-marshal.list
+GENMARSHAL_COMMAND = $(GLIB_GENMARSHAL) --prefix=libgbus_marshal
-BUILT_SOURCES = \
- libgbus-marshal.c \
- libgbus-marshal.h
+.list.c:
+ (echo '/* This file has been automatically generated. Do not edit. */' && \
+ echo '#include "$*.h"' && \
+ $(GENMARSHAL_COMMAND) --body $< ) >$@
-libgbus-marshal.c: libgbus-marshal.list
- echo "#include \"libgbus-marshal.h\"" > $@ && \
- @GLIB_GENMARSHAL@ $< --prefix=libgbus_marshal --body >> $@
+.list.h:
+ $(GENMARSHAL_COMMAND) --header $< >$@
-libgbus-marshal.h: libgbus-marshal.list
- @GLIB_GENMARSHAL@ $< --prefix=libgbus_marshal --header > $@
+# Hint: build this before target "all".
+BUILT_SOURCES = libgbus-marshal.h
-clean-local:
- rm -f *~
- rm -f *.out
- rm -f *.gcno
- rm -f *.gcda
- rm -f gcov.txt
- rm -f gprof.txt
- rm -f $(BUILT_SOURCES)
+# Hint: do not delete this file.
+# (see http://bugzilla.gnome.org/172211 and 172212 for gory details.)
+non-intermediate: libgbus-marshal.c
-CLEANFILES = $(BUILT_SOURCES)
+CLEANFILES = *~ *.out *.gcno *.gcda gcov.txt gprof.txt \
+ libgbus-marshal.h libgbus-marshal.c
diff --git a/libpackagekit/Makefile.am b/libpackagekit/Makefile.am
index 992d740..2405d2a 100644
--- a/libpackagekit/Makefile.am
+++ b/libpackagekit/Makefile.am
@@ -60,8 +60,7 @@ libpackagekit_include_HEADERS = \
libpackagekit_la_SOURCES = \
pk-debug.c \
pk-debug.h \
- pk-marshal.c \
- pk-marshal.h \
+ pk-marshal.list \
pk-extra.c \
pk-extra.h \
pk-extra-obj.c \
@@ -138,20 +137,22 @@ pk_self_test_LDADD = \
TESTS = pk-self-test
endif
-EXTRA_DIST = \
- pk-marshal.list
+GENMARSHAL_COMMAND = $(GLIB_GENMARSHAL) --prefix=pk_marshal
-BUILT_SOURCES = \
- pk-marshal.c \
- pk-marshal.h \
- $(NULL)
+.list.c:
+ (echo '/* This file has been automatically generated. Do not edit. */' && \
+ echo '#include "$*.h"' && \
+ $(GENMARSHAL_COMMAND) --body $< ) >$@
+
+.list.h:
+ $(GENMARSHAL_COMMAND) --header $< >$@
-pk-marshal.c: pk-marshal.list
- echo "#include \"pk-marshal.h\"" > $@ && \
- @GLIB_GENMARSHAL@ $< --prefix=pk_marshal --body >> $@
+# Hint: build this before target "all".
+BUILT_SOURCES = pk-marshal.h
-pk-marshal.h: pk-marshal.list
- @GLIB_GENMARSHAL@ $< --prefix=pk_marshal --header > $@
+# Hint: do not delete this file.
+# (see http://bugzilla.gnome.org/172211 and 172212 for gory details.)
+non-intermediate: pk-marshal.c
if PK_BUILD_GCOV
clean-gcov:
@@ -167,13 +168,6 @@ gprof: clean-gprof all check
gprof .libs/pk-self-test > gprof.txt
endif
-CLEANFILES = $(BUILT_SOURCES)
-
-clean-local:
- rm -f *~
- rm -f *.gcno
- rm -f *.out
- rm -f gcov.txt
- rm -f gprof.txt
- rm -f $(CLEANFILES)
+CLEANFILES = *~ *.gcno *.out gcov.txt gprof.txt \
+ pk-marshal.h pk-marshal.c
--
1.5.4.1
--ibTvN161/egqYuK8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="0004-do-not-list-check_PROGRAMS-again-in-noinst_PROGRAMS.patch"
More information about the PackageKit
mailing list