]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
binutils: fix out of tree building with syslex regens
authorMike Frysinger <vapier@gentoo.org>
Tue, 25 Oct 2011 20:39:41 +0000 (20:39 +0000)
committerMike Frysinger <vapier@gentoo.org>
Tue, 25 Oct 2011 20:39:41 +0000 (20:39 +0000)
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>
binutils/ChangeLog
binutils/Makefile.am
binutils/Makefile.in

index 43937986dd59b5351aa7ae209f677dd8c1268f8c..e483ac8d42c8d5033a642f21246cf2dd1c1b7bc4 100644 (file)
@@ -1,3 +1,8 @@
+2011-10-25  Mike Frysinger  <vapier@gentoo.org>
+
+       * Makefile.am (syslex.@OBJEXT@): Add -I$(srcdir).
+       * Makefile.in: Regen.
+
 2011-10-25  Joern Rennecke  <joern.rennecke@embecosm.com>
 
        * readelf.c: Include "elf/epiphany.h".
index bbe58e2132db1538fc8dafd282a80f76dc49c2de..59f759fccef660a02209641e50a5885222eafe96 100644 (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
index 9f10781d58af0bba0f38bcc13d7d820f21c82e20..9fe5642f94e35381990b4ec406d149f717900cc8 100644 (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