⛏️ index : buildtools.git

author Jérôme Duval <jerome.duval@gmail.com> 2012-01-06 21:29:10.0 +01:00:00
committer Jérôme Duval <jerome.duval@gmail.com> 2012-01-06 21:29:10.0 +01:00:00
commit
d534b97c8b46d01c5e21ee21bc6cacf72ff184bb [patch]
tree
2e5639b409d35679fda70d5490df6ebf1c2e0e82
parent
371dda46181887c375e74055f135d4efa313fb5c
download
d534b97c8b46d01c5e21ee21bc6cacf72ff184bb.tar.gz

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>

Diff

 binutils/binutils/Makefile.am | 2 +-
 binutils/binutils/Makefile.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/binutils/binutils/Makefile.am b/binutils/binutils/Makefile.am
index bbe58e2..59f759f 100644
--- a/binutils/binutils/Makefile.am
+++ b/binutils/binutils/Makefile.am
@@ -272,7 +272,7 @@

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
diff --git a/binutils/binutils/Makefile.in b/binutils/binutils/Makefile.in
index 9f10781..9fe5642 100644
--- a/binutils/binutils/Makefile.in
+++ b/binutils/binutils/Makefile.in
@@ -1286,7 +1286,7 @@

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