On Sun, Feb 27, 2011 at 03:26:32AM +0100, Cyril Brulebois wrote:
> Hi,
> 
> Keith Packard <kei...@keithp.com> (26/02/2011):
> > I read through the automake docs and they suggest placing a
> > dependency on the generated configuration header file. We've got
> > several, but there's the auto-generated do-not-use-config.h which
> > holds all of the cpp defines which sdksyms.c may use.
> > 
> > I think this is what we want: […]
> 
> at least, this fixes the issue I was having. Steps to reproduce:
>   git checkout master
>   git clean -xdf
>   autoreconf -vfi
>   ./configure
>   make dist
>   # elsewhere
>   tar xf $tarball
>   cd $directory
>   ./configure --disable-xv
> 
> With master → fails, master + your patch → works. Accordingly:
> 
> Tested-by: Cyril Brulebois <k...@debian.org>
> 
> Also, the generated sdksyms.c lands in the build directory, meaning
> one can happily do stuff like:
>   mkdir build1 build2
>   (cd build1 && ../configure --disable-stuff)
>   (cd build2 && ../configure --enable-stuff)
>   make -C build1
>   make -C build2
> 
> And even “make” build1 and build2 in parallel.
> 
> (FYI, that's what we do in Debian: we build two flavours; one regular,
> one for the debian-installer; with a configuration phase, then a build
> phase; hence my issues with --disable-xv and the like. ;))

I rolled Keith's diff in with my own and added the fix of actually
making sdksyms.dep be a prerequisite for sdksyms.c. I think that should
fix all the cases.

--
Dan
>From 6263490d272a2f15f1a38a8eb452b73e9bcd0ba2 Mon Sep 17 00:00:00 2001
From: Dan Nicholson <dbn.li...@gmail.com>
Date: Sat, 26 Feb 2011 08:34:27 -0800
Subject: [PATCH] xfree86: Ensure sdksyms.c is regenerated when appropriate

The contents of sdksyms.c are dependent on configuration, so they should
be freshly generated each time and not shipped in the tarball. Prereqs on
sdksyms.dep and one of the config.h files will ensure that the sdksyms.c
is regenerated whenever config.status is run.

Signed-off-by: Dan Nicholson <dbn.li...@gmail.com>
---
 hw/xfree86/loader/Makefile.am |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/loader/Makefile.am b/hw/xfree86/loader/Makefile.am
index 7f386cc..3d864cd 100644
--- a/hw/xfree86/loader/Makefile.am
+++ b/hw/xfree86/loader/Makefile.am
@@ -17,13 +17,17 @@ libloader_la_SOURCES = \
        loaderProcs.h \
        loadext.c \
         loadmod.c \
-       os.c \
+       os.c
+
+nodist_libloader_la_SOURCES = \
        sdksyms.c
+
 libloader_la_LIBADD = $(DLOPEN_LIBS)
 
 CLEANFILES = sdksyms.c sdksyms.dep
 
-sdksyms.dep sdksyms.c: sdksyms.sh
+sdksyms.c: sdksyms.dep
+sdksyms.dep sdksyms.c: sdksyms.sh $(top_builddir)/include/do-not-use-config.h
        CPP='$(CPP)' AWK='$(AWK)' $(srcdir)/sdksyms.sh $(top_srcdir) 
$(AM_CFLAGS) $(CFLAGS) $(INCLUDES)
 
 SDKSYMS_DEP = sdksyms.dep
-- 
1.7.3.4

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to