[PATCH] Fix build with BSD make.
dbn.lists at gmail.com
Mon Feb 14 10:15:50 PST 2011
On Mon, Feb 14, 2011 at 9:58 AM, Alan Coopersmith
<alan.coopersmith at oracle.com> wrote:
> On 02/14/11 08:52 AM, Gaetan Nadon wrote:
>> On Mon, 2011-02-14 at 07:29 -0800, Alan Coopersmith wrote:
>>> On 02/14/11 06:18 AM, Dan Nicholson wrote:
>>> > On Sun, Feb 13, 2011 at 11:43 PM, Matthieu Herrb <matthieu.herrb at laas.fr <mailto:matthieu.herrb at laas.fr>> 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.
>>> > According to the gnu make manual, sinclude is just a synonym for
>>> > "-include".
>>> Solaris make doesn't know about "-include" either - as far as I know, there
>>> is no conditional "include this file if it exists, else ignore it" directive.
>> It's probably a naïve suggestion, removing the need for sinclude by ensuring the
>> always produces a valid minimal sdksyms.dep could be a solution.
> If "the script" is the configure script, not something run out of the Makefile
> with the sinclude in. That's the problem - if you use a normal include, then
> make exits with a "file not found" error before it tries to run the script to
> generate sdksyms.dep.
Oh, what we can do is touch the sdksyms.dep file during configure.
This is how the other .dep files are handled and what is going on
during the "executing defiles commands" message is printed during
config.status. So, I think we just need to add
AC_CONFIG_COMMANDS([sdksyms], [touch hw/xfree86/loader/sdksyms.dep])
to configure.ac and then change the sinclude to regular include with
the indirection I mentioned earlier. If you look at a generated
Makefile in one of the directories with C files, you can see this is
exactly what it does other .dep files. Here's what AC_CONFIG_COMMANDS
On second thought, why do we need to generate the sdksyms.dep file
manually anyway? Can't we just declare sdksyms.c as nodist and
BUILT_SOURCES and let automake take care of it for us?
More information about the xorg-devel