From ee5aacbc6118ff55bf425c8e5717d7ad4210ed7e Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan Date: Fri, 14 Dec 2007 14:28:35 +0000 Subject: [PATCH] Fixed build when srcdir != builddir, made mkenums and friends use 2007-12-14 Yevgen Muntyan * gio/Makefile.am: * gio/inotify/Makefile.am: Fixed build when srcdir != builddir, made mkenums and friends use temporary files to avoid leaving empty generated files on failure (#503470). svn path=/trunk/; revision=6126 --- ChangeLog | 7 +++++++ gio/Makefile.am | 26 +++++++++++++++++--------- gio/inotify/Makefile.am | 1 + 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index b3ebc28a..03220352 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-12-14 Yevgen Muntyan + + * gio/Makefile.am: + * gio/inotify/Makefile.am: Fixed build when srcdir != builddir, + made mkenums and friends use temporary files to avoid leaving + empty generated files on failure (#503470). + 2007-12-13 Mathias Hasselmann Give exmples in error message unsupported case-changing escape diff --git a/gio/Makefile.am b/gio/Makefile.am index e5dd24db..e88ca33e 100644 --- a/gio/Makefile.am +++ b/gio/Makefile.am @@ -9,13 +9,16 @@ SUBDIRS += xdgmime endif gio.def: gio.symbols - (echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gio.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g' | sort) > gio.def + (echo -e EXPORTS; $(CPP) -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 -DALL_FILES - <$(srcdir)/gio.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g' | sort) > gio.def.tmp && \ + mv gio.def.tmp gio.def gioalias.h: gio.symbols - $(PERL) $(srcdir)/makegioalias.pl < $(srcdir)/gio.symbols > gioalias.h + $(PERL) $(srcdir)/makegioalias.pl < $(srcdir)/gio.symbols > gioalias.h.tmp && \ + mv gioalias.h.tmp gioalias.h gioaliasdef.c: gio.symbols - $(PERL) $(srcdir)/makegioalias.pl -def < $(srcdir)/gio.symbols > gioaliasdef.c + $(PERL) $(srcdir)/makegioalias.pl -def < $(srcdir)/gio.symbols > gioaliasdef.c.tmp && \ + mv gioaliasdef.c.tmp gioaliasdef.c if OS_LINUX if HAVE_GNUC_VISIBILITY @@ -48,11 +51,13 @@ else endif gio-marshal.h: gio-marshal.list - $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --header > $@ + $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --header > $@.tmp && \ + mv $@.tmp $@ gio-marshal.c: gio-marshal.h gio-marshal.list (echo "#include \"gio-marshal.h\""; \ - $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body) > $@ + $(glib_genmarshal) --prefix=_gio_marshal $(srcdir)/gio-marshal.list --body) > $@.tmp && \ + mv $@.tmp $@ local_sources = \ glocaldirectorymonitor.c \ @@ -265,8 +270,11 @@ CLEANFILES = \ $(NULL) gioenumtypes.h: $(gio_headers) gioenumtypes.h.template - ( cd $(srcdir) && $(top_builddir)/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > gioenumtypes.h - + ( top_builddir=`cd $(top_builddir) && pwd`; \ + cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.h.template $(gio_headers) ) > \ + gioenumtypes.h.tmp && mv gioenumtypes.h.tmp gioenumtypes.h + gioenumtypes.c: $(gio_headers) gioenumtypes.c.template - ( cd $(srcdir) && $(top_builddir)/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > gioenumtypes.c - + ( top_builddir=`cd $(top_builddir) && pwd`; \ + cd $(srcdir) && $$top_builddir/gobject/glib-mkenums --template gioenumtypes.c.template $(gio_headers) ) > \ + gioenumtypes.c.tmp && mv gioenumtypes.c.tmp gioenumtypes.c diff --git a/gio/inotify/Makefile.am b/gio/inotify/Makefile.am index 36d920aa..2186d483 100644 --- a/gio/inotify/Makefile.am +++ b/gio/inotify/Makefile.am @@ -31,6 +31,7 @@ libinotify_la_CFLAGS = \ -I$(top_srcdir)/glib \ -I$(top_srcdir)/gmodule \ -I$(top_srcdir)/gio \ + -I$(top_builddir)/gio \ -DGIO_MODULE_DIR=\"$(GIO_MODULE_DIR)\" \ -DGIO_COMPILATION \ -DG_DISABLE_DEPRECATED -- 2.34.1