binutils: fix out of tree building with syslex regens

If you take a release tarball (which has pregenerated syslex and sysinfo files
	in it), apply some patches which touch syslex.l, and then build the result out
	of tree, it will fail.  This is because syslex.l uses sysinfo.h, but the
	sysinfo.y file wasn't updated and so it wasn't regenerated (the files are found
	in the $srcdir), and the build rule for syslex.c does not use -I$(srcdir) when
	it finds a local file.  Simple fix below.

	Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Jérôme Duval 2012-01-06 21:29:10 +01:00
parent 371dda4618
commit d534b97c8b
2 changed files with 2 additions and 2 deletions

View File

@ -272,7 +272,7 @@ sysinfo$(EXEEXT_FOR_BUILD): sysinfo.@OBJEXT@ syslex.@OBJEXT@
syslex.@OBJEXT@: syslex.c sysinfo.h config.h
if [ -r syslex.c ]; then \
$(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) syslex.c ; \
$(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) syslex.c ; \
else \
$(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex.c ;\
fi

View File

@ -1286,7 +1286,7 @@ sysinfo$(EXEEXT_FOR_BUILD): sysinfo.@OBJEXT@ syslex.@OBJEXT@
syslex.@OBJEXT@: syslex.c sysinfo.h config.h
if [ -r syslex.c ]; then \
$(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) syslex.c ; \
$(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) syslex.c ; \
else \
$(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex.c ;\
fi