On Mon, Feb 14, 2011 at 08:43:08AM +0100, Matthieu Herrb wrote:
> On Sun, Feb 13, 2011 at 04:44:35PM -0800, Alan Coopersmith wrote:
> > On 02/13/11 12:51 PM, Matthieu Herrb wrote:
> > > $< is not allowed in explicit rules.
> > 
> > Solaris make has the same limitation, but since I have to use gnu make due 
> > to
> > the sinclude in hw/xfree86/loader/Makefile.am I'd not noticed that
> > yet.
> 
> Yes I have a local patch for that too. I don't know how to achieve
> this in a portable way. 

I think this should fix the sinclude issue. I tried to look at whether
sdksyms.dep could be dropped, but automake sets up automatic deps for
the object, not the source file. So, I think we need to generate deps
for the source file so that sdksyms.c gets regenerated and not just
recompiled.

--
Dan
>From 701a855e0e8b951ef044f26a4e19b278e2c7b62d Mon Sep 17 00:00:00 2001
From: Dan Nicholson <dbn.li...@gmail.com>
Date: Tue, 15 Feb 2011 06:03:28 -0800
Subject: [PATCH] xfree86: Allow sdksyms.dep to be included portably

Non-GNU makes don't deal with the sinclude or -include variants that
allow Makefile stubs to be created and then included during the build.
Instead, create an empty file at the end of configure so that the
regular include statement can be included. This is how automake handles
automatic source dependencies.

In order to trick automake into not processing the include statement, a
variable is used.

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

diff --git a/configure.ac b/configure.ac
index 1ceffe7..6012b8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2168,6 +2168,8 @@ AC_SUBST([libdir])
 AC_SUBST([exec_prefix])
 AC_SUBST([prefix])
 
+AC_CONFIG_COMMANDS([sdksyms], [touch hw/xfree86/loader/sdksyms.dep])
+
 AC_OUTPUT([
 Makefile
 glx/Makefile
diff --git a/hw/xfree86/loader/Makefile.am b/hw/xfree86/loader/Makefile.am
index 2bac89a..7f386cc 100644
--- a/hw/xfree86/loader/Makefile.am
+++ b/hw/xfree86/loader/Makefile.am
@@ -26,4 +26,5 @@ CLEANFILES = sdksyms.c sdksyms.dep
 sdksyms.dep sdksyms.c: sdksyms.sh
        CPP='$(CPP)' AWK='$(AWK)' $(srcdir)/sdksyms.sh $(top_srcdir) 
$(AM_CFLAGS) $(CFLAGS) $(INCLUDES)
 
-sinclude sdksyms.dep
+SDKSYMS_DEP = sdksyms.dep
+include $(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