diff options
author | Vladimir Mezentsev <vladimir.mezentsev@oracle.com> | 2023-10-03 23:53:01 -0700 |
---|---|---|
committer | Vladimir Mezentsev <vladimir.mezentsev@oracle.com> | 2023-10-05 08:09:45 -0700 |
commit | e5b3bfa519a9704288219d09fef1a792663351c0 (patch) | |
tree | abeff3f750232de254611125eae197e5fb1cef7d /gprofng/src/Makefile.am | |
parent | 345309aadd64b701426fe3b4f4184ae689feef06 (diff) | |
download | binutils-e5b3bfa519a9704288219d09fef1a792663351c0.zip binutils-e5b3bfa519a9704288219d09fef1a792663351c0.tar.gz binutils-e5b3bfa519a9704288219d09fef1a792663351c0.tar.bz2 |
gprofng: 30894 bison should be no hard dependency
When running from a distribution tarball, bison should not be necessary.
The generated files (QLParser.tab.cc, QLParser.tab.hh) should be distributed.
configure.ac should not abort if bison is missing.
configure.ac should remove temporary files (dummy.c, Simple.class).
bison must be run once to create QLParser.tab.cc and QLParser.tab.hh.
gprofng/ChangeLog
2023-10-03 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
PR gprofng/30894
* configure.ac: Don't abort if bison is missing. Remove temporary files.
* src/Makefile.am: Distribute QLParser.tab.cc and QLParser.tab.hh.
* Run bison once to create QLParser.tab.cc and QLParser.tab.hh.
* configure: Rebuild.
* src/Makefile.in: Rebuild.
Diffstat (limited to 'gprofng/src/Makefile.am')
-rw-r--r-- | gprofng/src/Makefile.am | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/gprofng/src/Makefile.am b/gprofng/src/Makefile.am index 219367f..20c8b00 100644 --- a/gprofng/src/Makefile.am +++ b/gprofng/src/Makefile.am @@ -117,12 +117,25 @@ AM_CFLAGS = $(GPROFNG_CFLAGS) $(PTHREAD_CFLAGS) \ $(GPROFNG_NO_SWITCH_CFLAGS) AM_CXXFLAGS = $(AM_CFLAGS) -QLParser.tab.cc QLParser.tab.hh: QLParser.yy +# bison generates two files QLParser.tab.cc, QLParser.tab.hh. +# we don't know which file will be newer. +# Make QLParser.tab.cc always newer than QLParser.tab.hh. +QLParser.tab.hh: QLParser.yy + if test "$(BISON)" = ":"; then \ + echo "fatal: Building gprofng requires bison 3.0.4 or later."; \ + exit 1; \ + fi; \ $(BISON) $^ -BUILT_SOURCES = QLParser.tab.hh -EXTRA_DIST = QLParser.yy +QLParser.tab.cc: QLParser.tab.hh + touch $@ +BUILT_SOURCES = QLParser.tab.cc QLParser.tab.hh +EXTRA_DIST = QLParser.tab.cc QLParser.tab.hh QLParser.yy + +# info and diststuff are needed for src-release.sh: +info: $(BUILT_SOURCES) +diststuff: info lib_LTLIBRARIES = $(LIBGPROFNG) libgprofng_la_SOURCES = $(CCSOURCES) $(CSOURCES) |