summaryrefslogtreecommitdiff
path: root/binutils/Makefile.am
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-10-25 20:39:40 +0000
committerMike Frysinger <vapier@gentoo.org>2011-10-25 20:39:40 +0000
commitc8704f69dffd3dd4200a00408b76009bcd3be62d (patch)
treeb2e6cabc0b43782498b4914fcabc8a4ab4838871 /binutils/Makefile.am
parentcde6d02aaaa881f9067375e56205b637b6507bda (diff)
downloadbinutils-redhat-c8704f69dffd3dd4200a00408b76009bcd3be62d.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>
Diffstat (limited to 'binutils/Makefile.am')
-rw-r--r--binutils/Makefile.am2
1 files changed, 1 insertions, 1 deletions
diff --git a/binutils/Makefile.am b/binutils/Makefile.am
index bbe58e2132..59f759fcce 100644
--- a/binutils/Makefile.am
+++ b/binutils/Makefile.am
@@ -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