remove intltool stuff on distclean.

2004-11-10  James Henstridge  <james@jamesh.id.au>

	* Makefile.am (DISTCLEANFILES): remove intltool stuff on distclean.

	* src/themes/Makefile.am (uninstall-local): add uninstall rule.

	* src/Makefile.am (libmetacity_private_la_CFLAGS): set this
	variable so that the files shared with metacity get compiled with
	different names.

	* configure.in: use more modern macros in some places, and make
	sure that $ACLOCAL_AMFLAGS is set so that rebuilds work better.

	* autogen.sh (conf_flags): use newer automake.
This commit is contained in:
James Henstridge 2004-11-10 07:59:38 +00:00 committed by James Henstridge
parent f3743bc494
commit bc9e517842
6 changed files with 136 additions and 83 deletions

View File

@ -1,3 +1,18 @@
2004-11-10 James Henstridge <james@jamesh.id.au>
* Makefile.am (DISTCLEANFILES): remove intltool stuff on distclean.
* src/themes/Makefile.am (uninstall-local): add uninstall rule.
* src/Makefile.am (libmetacity_private_la_CFLAGS): set this
variable so that the files shared with metacity get compiled with
different names.
* configure.in: use more modern macros in some places, and make
sure that $ACLOCAL_AMFLAGS is set so that rebuilds work better.
* autogen.sh (conf_flags): use newer automake.
2004-11-06 Vincent Untz <vincent@vuntz.net> 2004-11-06 Vincent Untz <vincent@vuntz.net>
* src/metacity.schemas.in: gnome-panel-screenshot was renamed to * src/metacity.schemas.in: gnome-panel-screenshot was renamed to

View File

@ -3,3 +3,5 @@ SUBDIRS=src po doc
EXTRA_DIST=HACKING rationales.txt \ EXTRA_DIST=HACKING rationales.txt \
intltool-extract.in intltool-merge.in intltool-update.in intltool-extract.in intltool-merge.in intltool-update.in
DISTCLEANFILES = intltool-extract intltool-merge intltool-update

View File

@ -12,35 +12,36 @@ FILE=src/display.c
DIE=0 DIE=0
AUTOMAKE=automake-1.4
ACLOCAL=aclocal-1.4
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
AUTOMAKE=automake
ACLOCAL=aclocal
}
(autoconf --version) < /dev/null > /dev/null 2>&1 || { (autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo echo
echo "You must have autoconf installed to compile $PROJECT." echo "You must have autoconf installed to compile $PROJECT."
echo "Download the appropriate package for your distribution," echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
DIE=1 DIE=1
} }
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || { if automake-1.9 --version < /dev/null > /dev/null 2>&1; then
AUTOMAKE=automake-1.9
ACLOCAL=aclocal-1.9
elif automake-1.8 --version < /dev/null > /dev/null 2>&1; then
AUTOMAKE=automake-1.8
ACLOCAL=aclocal-1.8
elif automake-1.7 --version < /dev/null > /dev/null 2>&1; then
AUTOMAKE=automake-1.7
ACLOCAL=aclocal-1.7
else
echo echo
echo "You must have automake installed to compile $PROJECT." echo "You must have automake >= 1.7 installed to compile $PROJECT."
echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz" echo "Get http://ftp.gnu.org/gnu/automake/automake-1.9.3.tar.bz2"
echo "(or a newer version if it is available)" echo "(or a newer version if it is available)"
DIE=1 DIE=1
} fi
(grep "^AM_PROG_LIBTOOL" configure.in >/dev/null) && { (grep "^AM_PROG_LIBTOOL" configure.in >/dev/null) && {
(libtool --version) < /dev/null > /dev/null 2>&1 || { (libtool --version) < /dev/null > /dev/null 2>&1 || {
echo echo
echo "**Error**: You must have \`libtool' installed to compile $PROJECT." echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" echo "Get http://ftp.gnu.org/gnu/libtool/libtool-1.5.10.tar.gz"
echo "(or a newer version if it is available)" echo "(or a newer version if it is available)"
DIE=1 DIE=1
} }
@ -84,10 +85,7 @@ if test -z "$*"; then
echo "to pass any to it, please specify them on the $0 command line." echo "to pass any to it, please specify them on the $0 command line."
fi fi
case $CC in topdir=`pwd`
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
esac
for coin in . for coin in .
do do
dr=`dirname $coin` dr=`dirname $coin`
@ -95,16 +93,7 @@ do
echo skipping $dr -- flagged as no auto-gen echo skipping $dr -- flagged as no auto-gen
else else
echo processing $dr echo processing $dr
macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin` cd $dr
( cd $dr
aclocalinclude="$ACLOCAL_FLAGS"
for k in $macrodirs; do
if test -d $k; then
aclocalinclude="$aclocalinclude -I $k"
##else
## echo "**Warning**: No such directory \`$k'. Ignored."
fi
done
if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
if grep "sed.*POTFILES" configure.in >/dev/null; then if grep "sed.*POTFILES" configure.in >/dev/null; then
: do nothing -- we still have an old unmodified configure.in : do nothing -- we still have an old unmodified configure.in
@ -112,34 +101,32 @@ do
echo "Creating $dr/aclocal.m4 ..." echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
echo "Running glib-gettextize... Ignore non-fatal messages." echo "Running glib-gettextize... Ignore non-fatal messages."
echo "no" | glib-gettextize --force --copy echo "no" | glib-gettextize --force --copy || exit $?
echo "Making $dr/aclocal.m4 writable ..." echo "Making $dr/aclocal.m4 writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
fi fi
fi fi
if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then
echo "Running intltoolize..." echo "Running intltoolize..."
intltoolize --force --copy --automake intltoolize --force --copy --automake || exit $?
fi fi
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
echo "Running libtoolize..." echo "Running libtoolize..."
libtoolize --force --copy libtoolize --force --copy || exit $?
fi fi
echo "Running $ACLOCAL $aclocalinclude ..." echo "Running $ACLOCAL $ACLOCAL_FLAGS ..."
$ACLOCAL $aclocalinclude $ACLOCAL $ACLOCAL_FLAGS || exit $?
echo "Running autoconf ..."
autoconf || exit $?
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
echo "Running autoheader..." echo "Running autoheader..."
autoheader autoheader || exit $?
fi fi
echo "Running $AUTOMAKE..."
$AUTOMAKE --add-missing --force --gnu || exit $?
echo "Running $AUTOMAKE --gnu $am_opt ..." cd $topdir
$AUTOMAKE --add-missing --gnu $am_opt
echo "Running autoconf ..."
autoconf
)
fi fi
done done
@ -150,7 +137,7 @@ cd "$ORIGDIR"
if test x$NOCONFIGURE = x; then if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ... echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \ $srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile $PROJECT || exit 1 && echo Now type \`make\' to compile $PROJECT || exit $?
else else
echo Skipping configure process. echo Skipping configure process.
fi fi

View File

@ -1,19 +1,20 @@
AC_PREREQ(2.50) AC_PREREQ(2.50)
AC_INIT(src/display.c) AC_INIT([metacity], [2.9.1],
[http://bugzilla.gnome.org/enter_bug.cgi?product=metacity])
AM_CONFIG_HEADER(config.h) AC_CONFIG_SRCDIR(src/display.c)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE(metacity, 2.9.1) AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
# Honor aclocal flags # Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")
GETTEXT_PACKAGE=metacity GETTEXT_PACKAGE=metacity
AC_SUBST(GETTEXT_PACKAGE) AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Name of default gettext domain]) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Name of default gettext domain])
AM_MAINTAINER_MODE
AC_PROG_INTLTOOL([0.21]) AC_PROG_INTLTOOL([0.21])
AC_PROG_CC AC_PROG_CC
AC_ISC_POSIX AC_ISC_POSIX
@ -99,37 +100,64 @@ changequote([,])dnl
METACITY_PC_MODULES='gtk+-2.0 >= 2.2.0 pango >= 1.2.0' METACITY_PC_MODULES='gtk+-2.0 >= 2.2.0 pango >= 1.2.0'
AC_ARG_ENABLE(config-dialog, [ --enable-config-dialog enable the config dialog that you need with GNOME 2.0 (obsolete with GNOME 2.2)],,enable_config_dialog=no) AC_ARG_ENABLE(config-dialog,
AC_HELP_STRING([--enable-config-dialog],
[enable the config dialog that you need with GNOME 2.0 (obsolete with GNOME 2.2)]),,
enable_config_dialog=no)
AM_CONDITIONAL(BUILD_CONFIG_DIALOG, test x$enable_config_dialog = xyes) AM_CONDITIONAL(BUILD_CONFIG_DIALOG, test x$enable_config_dialog = xyes)
if test x$enable_config_dialog = xyes; then if test x$enable_config_dialog = xyes; then
AC_DEFINE(BUILD_CONFIG_DIALOG,1,[Build configuration dialog]) AC_DEFINE(BUILD_CONFIG_DIALOG,1,[Build configuration dialog])
fi fi
AC_ARG_ENABLE(gconf, [ --disable-gconf disable gconf usage, for embedded/size-sensitive non-GNOME builds],,enable_gconf=yes) AC_ARG_ENABLE(gconf,
AC_HELP_STRING([--disable-gconf],
[disable gconf usage, for embedded/size-sensitive non-GNOME builds]),,
enable_gconf=yes)
if test x$enable_gconf = xyes; then if test x$enable_gconf = xyes; then
AC_DEFINE(HAVE_GCONF,1,[Build with gconf support]) AC_DEFINE(HAVE_GCONF,1,[Build with gconf support])
METACITY_PC_MODULES="$METACITY_PC_MODULES gconf-2.0 >= 1.2.0" METACITY_PC_MODULES="$METACITY_PC_MODULES gconf-2.0 >= 1.2.0"
fi fi
AC_ARG_ENABLE(verbose-mode, [ --disable-verbose disable metacity's ability to do verbose logging, for embedded/size-sensitive custom builds],,enable_verbose_mode=yes) AC_ARG_ENABLE(verbose-mode,
AC_HELP_STRING([--disable-verbose],
[disable metacity's ability to do verbose logging, for embedded/size-sensitive custom builds]),,
enable_verbose_mode=yes)
if test x$enable_verbose_mode = xyes; then if test x$enable_verbose_mode = xyes; then
AC_DEFINE(WITH_VERBOSE_MODE,1,[Build with verbose mode support]) AC_DEFINE(WITH_VERBOSE_MODE,1,[Build with verbose mode support])
fi fi
AC_ARG_ENABLE(sm, [ --disable-sm disable metacity's session management support, for embedded/size-sensitive custom non-GNOME builds],,enable_sm=auto) AC_ARG_ENABLE(sm,
AC_HELP_STRING([--disable-sm],
[disable metacity's session management support, for embedded/size-sensitive custom non-GNOME builds]),,
enable_sm=auto)
AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification disable metacity's startup notification support, for embedded/size-sensitive custom non-GNOME builds],,enable_startup_notification=auto) AC_ARG_ENABLE(startup-notification,
AC_HELP_STRING([--disable-startup-notification],
[disable metacity's startup notification support, for embedded/size-sensitive custom non-GNOME builds]),,
enable_startup_notification=auto)
AC_ARG_ENABLE(compositor, [ --disable-compositor disable metacity's compositing manager],,enable_compositor=auto) AC_ARG_ENABLE(compositor,
AC_HELP_STRING([--disable-compositor],
[disable metacity's compositing manager]),,
enable_compositor=auto)
AC_ARG_ENABLE(xsync, [ --disable-xsync disable metacity's use of the XSync extension],,enable_xsync=auto) AC_ARG_ENABLE(xsync,
AC_HELP_STRING([--disable-xsync],
[disable metacity's use of the XSync extension]),,
enable_xsync=auto)
AC_ARG_ENABLE(render, [ --disable-render disable metacity's use of the RENDER extension],,enable_render=auto) AC_ARG_ENABLE(render,
AC_HELP_STRING([--disable-render],
[disable metacity's use of the RENDER extension]),,
enable_render=auto)
AC_ARG_ENABLE(shape, [ --disable-shape disable metacity's use of the shaped window extension],,enable_shape=auto) AC_ARG_ENABLE(shape,
AC_HELP_STRING([--disable-shape],
[disable metacity's use of the shaped window extension]),,
enable_shape=auto)
## try definining HAVE_BACKTRACE ## try definining HAVE_BACKTRACE
AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)]) AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
@ -251,7 +279,9 @@ ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
metacity_save_cppflags="$CPPFLAGS" metacity_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS"
AC_ARG_ENABLE(xinerama,[ --disable-xinerama disable metacity's use of the Xinerama extension], AC_ARG_ENABLE(xinerama,
AC_HELP_STRING([--disable-xinerama],
[disable metacity's use of the Xinerama extension]),
try_xinerama=$enable_xinerama,try_xinerama=yes) try_xinerama=$enable_xinerama,try_xinerama=yes)
use_solaris_xinerama=no use_solaris_xinerama=no
@ -429,7 +459,7 @@ if test x$enable_gconf = xyes; then
AM_GCONF_SOURCE_2 AM_GCONF_SOURCE_2
fi fi
AC_OUTPUT([ AC_CONFIG_FILES([
Makefile Makefile
doc/Makefile doc/Makefile
src/Makefile src/Makefile
@ -440,6 +470,8 @@ src/themes/Makefile
po/Makefile.in po/Makefile.in
]) ])
AC_OUTPUT
if test x$enable_gconf = xno; then if test x$enable_gconf = xno; then
echo "*** WARNING WARNING WARNING WARNING WARNING" echo "*** WARNING WARNING WARNING WARNING WARNING"
echo "*** Building without GConf" echo "*** Building without GConf"

View File

@ -90,6 +90,9 @@ metacity_SOURCES= \
xprops.h \ xprops.h \
$(EGGFILES) $(EGGFILES)
# by setting libmetacity_private_la_CFLAGS, the files shared with
# metacity proper will be compiled with different names.
libmetacity_private_la_CFLAGS =
libmetacity_private_la_SOURCES= \ libmetacity_private_la_SOURCES= \
gradient.c \ gradient.c \
gradient.h \ gradient.h \
@ -164,7 +167,7 @@ VARIABLES=default_icon_data $(srcdir)/default_icon.png \
stock_delete_data $(srcdir)/stock_delete.png stock_delete_data $(srcdir)/stock_delete.png
BUILT_SOURCES = inlinepixbufs.h BUILT_SOURCES = inlinepixbufs.h
CLEANFILES = inlinepixbufs.h CLEANFILES = inlinepixbufs.h metacity.desktop metacity.schemas
inlinepixbufs.h: $(IMAGES) inlinepixbufs.h: $(IMAGES)
$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h

View File

@ -23,6 +23,20 @@ install-data-local:
done) \ done) \
done done
uninstall-local:
for THEME in $(THEMES); do \
echo '-- Uninstalling theme '$$THEME; \
(uninstallfiles=`find $(srcdir)/$$THEME -name "*.png" -o -name "*.xml"`; \
for i in $$uninstallfiles; do \
i=`basename $$i`; \
echo '-- Removing '$$i ; \
rm -f $(DESTDIR)$(THEME_DIR)/$$THEME/$(THEME_SUBDIR)/$$i ; \
done); \
rmdir $(DESTDIR)$(THEME_DIR)/$$THEME/$(THEME_SUBDIR) || :; \
rmdir $(DESTDIR)$(THEME_DIR)/$$THEME || :; \
done
-rmdir $(DESTDIR)$(THEME_DIR)
dist-hook: dist-hook:
mkdir $(distdir)/themes; \ mkdir $(distdir)/themes; \
for THEME in $(THEMES); do \ for THEME in $(THEMES); do \