From 83d67bf2e79e1cb984e398b218cedd0b1e50bd1f Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Sun, 11 Jul 2010 21:08:42 -0400 Subject: [PATCH] move glibconfig.h to glib/ --- .gitignore | 2 -- Makefile.am | 18 +----------- configure.in | 14 ++++----- gio/abicheck.sh | 2 +- glib/.gitignore | 4 +++ glib/Makefile.am | 29 +++++++++++++++++-- glib/abicheck.sh | 2 +- .../glibconfig.h.win32.in | 0 gobject/abicheck.sh | 2 +- 9 files changed, 41 insertions(+), 32 deletions(-) rename glibconfig.h.win32.in => glib/glibconfig.h.win32.in (100%) diff --git a/.gitignore b/.gitignore index 398d19562..7760130c7 100644 --- a/.gitignore +++ b/.gitignore @@ -30,9 +30,7 @@ missing install-sh glib-gettextize glib-zip -glibconfig.h gtk-doc.make -glibconfig.h.win32 INSTALL README diff --git a/Makefile.am b/Makefile.am index 668953e19..98c2e83d9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -43,7 +43,6 @@ EXTRA_DIST += \ Makefile.decl \ mkinstalldirs \ makefile.msc \ - glibconfig.h.win32.in \ msvc_recommended_pragmas.h \ config.h.win32.in \ po/po2tbl.sed.in \ @@ -70,26 +69,11 @@ BUILT_EXTRA_DIST = \ README \ INSTALL \ ChangeLog \ - glibconfig.h.win32 \ config.h.win32 \ gtk-doc.make -configexecincludedir = $(libdir)/glib-2.0/include -configexecinclude_DATA = glibconfig.h - -uninstall-local: - rm -f $(DESTDIR)$(configexecincludedir)/glibconfig.h - CONFIGURE_DEPENDENCIES = acglib.m4 -BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h -glibconfig.h: stamp-gc-h - $(AM_V_GEN) if test -f glibconfig.h; then :; \ - else rm -f stamp-gc-h; $(MAKE) stamp-gc-h; fi -stamp-gc-h: config.status - cd $(top_builddir) && $(SHELL) ./config.status glibconfig.h - echo timestamp > stamp-gc-h - ChangeLog: $(AM_V_GEN) if test -d "$(srcdir)/.git"; then \ (GIT_DIR=$(top_srcdir)/.git ./missing --run git log GLIB_2_20_0^^.. --stat) | fmt --split-only > $@.tmp \ @@ -123,7 +107,7 @@ gettext_SCRIPTS = mkinstalldirs # build documentation when doing distcheck DISTCHECK_CONFIGURE_FLAGS = --enable-debug --enable-gtk-doc --enable-man -DISTCLEANFILES = glibconfig-sysdefs.h glibconfig.h stamp-gc-h config.lt +DISTCLEANFILES = config.lt distclean-local: lcov-clean if test $(srcdir) = .; then :; else \ diff --git a/configure.in b/configure.in index e91a3080a..9728134d3 100644 --- a/configure.in +++ b/configure.in @@ -2911,10 +2911,10 @@ dnl *** output the whole stuff *** dnl ****************************** dnl this section will only be run if config.status is invoked with no -dnl arguments, or with "glibconfig.h" as an argument. -AC_CONFIG_COMMANDS([glibconfig.h], +dnl arguments, or with "glib/glibconfig.h" as an argument. +AC_CONFIG_COMMANDS([glib/glibconfig.h], [ - outfile=glibconfig.h-tmp + outfile=glib/glibconfig.h-tmp cat > $outfile <<\_______EOF /* glibconfig.h * @@ -3283,11 +3283,11 @@ G_END_DECLS _______EOF - if cmp -s $outfile glibconfig.h; then - AC_MSG_NOTICE([glibconfig.h is unchanged]) + if cmp -s $outfile glib/glibconfig.h; then + AC_MSG_NOTICE([glib/glibconfig.h is unchanged]) rm -f $outfile else - mv $outfile glibconfig.h + mv $outfile glib/glibconfig.h fi ],[ @@ -3739,7 +3739,7 @@ if false; then INSTALL README config.h.win32 - glibconfig.h.win32 + glib/glibconfig.h.win32 glib/makefile.msc glib/glib.rc gmodule/makefile.msc diff --git a/gio/abicheck.sh b/gio/abicheck.sh index 0f4d40c02..2f76d7b53 100755 --- a/gio/abicheck.sh +++ b/gio/abicheck.sh @@ -1,6 +1,6 @@ #! /bin/sh -egrep '^#([^i]|if).*[^\]$' "${top_builddir:-..}/glibconfig.h" > glibconfig.cpp +egrep '^#([^i]|if).*[^\]$' "${top_builddir:-..}/glib/glibconfig.h" > glibconfig.cpp INCLUDES="-include ${top_builddir:-..}/config.h" INCLUDES="$INCLUDES -include glibconfig.cpp" diff --git a/glib/.gitignore b/glib/.gitignore index e01168deb..db2424778 100644 --- a/glib/.gitignore +++ b/glib/.gitignore @@ -1,3 +1,7 @@ +glibconfig.h +glibconfig.h.win32 +glibconfig-stamp + gtester libglib-gdb.py makefile.msc diff --git a/glib/Makefile.am b/glib/Makefile.am index 52b09a2d7..5d114a912 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -1,7 +1,28 @@ ## Process this file with automake to produce Makefile.in include $(top_srcdir)/Makefile.decl -CLEANFILES= +BUILT_SOURCES = +DISTCLEANFILES = +CLEANFILES = + +# +# Generate glibconfig.h +# +# The timestamp of the stamp file is used to indicate if glibconfig.h is +# up to date with respect to config.status. In the usual case, changes +# to config.status will not result in changes to glibconfig.h so we +# avoid touching its timestamp (in order not to rebuild the whole tree). +# +DISTCLEANFILES += glibconfig-stamp glibconfig.h +BUILT_SOURCES += glibconfig-stamp +configexecincludedir = $(libdir)/glib-2.0/include +configexecinclude_HEADERS = glibconfig.h +glibconfig-stamp: ../config.status + $(AM_V_GEN) cd $(top_builddir) && \ + $(SHELL) ./config.status glib/glibconfig.h + @touch glibconfig-stamp + + if HAVE_GOOD_PRINTF else @@ -63,6 +84,7 @@ EXTRA_DIST += \ glib.rc.in \ gen-unicode-tables.pl \ gen-script-table.pl \ + glibconfig.h.win32.in \ abicheck.sh \ glib.symbols \ gregex.c \ @@ -74,6 +96,7 @@ EXTRA_DIST += \ # These may be in the builddir too BUILT_EXTRA_DIST = \ makefile.msc \ + glibconfig.h.win32 \ glib.rc lib_LTLIBRARIES = libglib-2.0.la @@ -317,14 +340,13 @@ libglib_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \ INSTALL_PROGS= - if ENABLE_DTRACE glib_probes.h: glib_probes.d Makefile $(DTRACE) -C -h -s $< -o $@.tmp sed -e "s,define STAP_HAS_SEMAPHORES 1,undef STAP_HAS_SEMAPHORES," < $@.tmp > $@ && rm -f $@.tmp glib_probes.o: glib_probes.d Makefile $(DTRACE) -G -s $< -o $@ -BUILT_SOURCES = glib_probes.h glib_probes.o +BUILT_SOURCES += glib_probes.h glib_probes.o CLEANFILES += glib_probes.h glib_probes.h.tmp libglib_2_0_la_LIBADD += glib_probes.o endif @@ -347,6 +369,7 @@ gspawn-win64-helper-console.c: echo '#define HELPER_CONSOLE' >$@ echo '#include "gspawn-win32-helper.c"' >>$@ + if OS_WIN32 if OS_WIN32_X64 INSTALL_PROGS += gspawn-win64-helper gspawn-win64-helper-console diff --git a/glib/abicheck.sh b/glib/abicheck.sh index 7ccc120b5..d2c9d88cc 100755 --- a/glib/abicheck.sh +++ b/glib/abicheck.sh @@ -1,6 +1,6 @@ #! /bin/sh -egrep '^#([^i]|if).*[^\]$' "${top_builddir:-..}/glibconfig.h" > glibconfig.cpp +egrep '^#([^i]|if).*[^\]$' "${builddir:-.}/glibconfig.h" > glibconfig.cpp INCLUDES="-include ${top_builddir:-..}/config.h" INCLUDES="$INCLUDES -include glibconfig.cpp $GLIB_DEBUG_FLAGS" diff --git a/glibconfig.h.win32.in b/glib/glibconfig.h.win32.in similarity index 100% rename from glibconfig.h.win32.in rename to glib/glibconfig.h.win32.in diff --git a/gobject/abicheck.sh b/gobject/abicheck.sh index 1f0e3ef30..e2711ef32 100755 --- a/gobject/abicheck.sh +++ b/gobject/abicheck.sh @@ -1,6 +1,6 @@ #! /bin/sh -egrep '^#([^i]|if).*[^\]$' "${top_builddir:-..}/glibconfig.h" > glibconfig.cpp +egrep '^#([^i]|if).*[^\]$' "${top_builddir:-..}/glib/glibconfig.h" > glibconfig.cpp INCLUDES="-include ${top_builddir:-..}/config.h" INCLUDES="$INCLUDES -include glibconfig.cpp"