From bd3109fc25dd5485cfa6dd5020ce86e67d98f5d5 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Fri, 14 Nov 2008 22:26:06 +0100 Subject: [PATCH] reorganize autoconf macro files append xorgversion.m4 to xorg-macros.m4.in, instead of installing it as separate file. Avoid copying some code from xorgversion.m4 to configure.ac. --- Makefile.am | 10 ++++++++-- configure.ac | 20 ++++++-------------- xorg-macros.m4.in | 2 ++ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Makefile.am b/Makefile.am index fd5c1ea..3e7ff73 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,9 +20,15 @@ # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. aclocaldir = $(datadir)/aclocal -aclocal_DATA = xorgversion.m4 xorg-macros.m4 +aclocal_DATA = xorg-macros.m4 -EXTRA_DIST = $(aclocal_DATA) ChangeLog +# Previous versions used to install xorgversion.m4, now integrated +# into xorg-macros.m4. Explicitly remove that old file in order not +# to have a macro defined in two different files. +install-data-hook: + rm -f $(DESTDIR)$(aclocaldir)/xorgversion.m4 + +EXTRA_DIST = ChangeLog .PHONY: ChangeLog diff --git a/configure.ac b/configure.ac index 676a70d..78daa0d 100644 --- a/configure.ac +++ b/configure.ac @@ -27,18 +27,10 @@ AC_INIT([util-macros], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) -# Since this is the package that installs the xorgversion.m4 file, we -# cannot use it here. Therefore, we copy the code from the m4 file. -# Please try to keep them in sync. -AC_ARG_WITH(release-version, - AC_HELP_STRING([--with-release-version=STRING] - [Use release version string in package name]), - [RELEASE_VERSION="$withval"], - [RELEASE_VERSION=""]) -if test "x$RELEASE_VERSION" != "x"; then - PACKAGE="$PACKAGE-$RELEASE_VERSION" - PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" - AC_MSG_NOTICE([Building with package name set to $PACKAGE]) -fi +# This is the package that installs xorgversion.m4 as part of xorg-macros.m4. +# In order to use xorgversion.m4 here, we include it explicitly. +m4_include([xorgversion.m4]) -AC_OUTPUT([Makefile xorg-macros.m4]) +XORG_RELEASE_VERSION + +AC_OUTPUT([Makefile xorg-macros.m4:xorg-macros.m4.in:xorgversion.m4]) diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in index 0eda9a8..5a1192b 100644 --- a/xorg-macros.m4.in +++ b/xorg-macros.m4.in @@ -1,3 +1,4 @@ +dnl @configure_input@ dnl dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. dnl @@ -423,3 +424,4 @@ AC_SUBST(LINTLIB) AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) ]) # XORG_LINT_LIBRARY + -- 1.6.0.3