Changeset: 037e3cf3c259 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/037e3cf3c259
Modified Files:
        buildtools/autogen/autogen/msc.py
Branch: Jun2020
Log Message:

Make sure bison generates include file before main .c file.
This makes it compilable again on Windows.


diffs (23 lines):

diff --git a/buildtools/autogen/autogen/msc.py 
b/buildtools/autogen/autogen/msc.py
--- a/buildtools/autogen/autogen/msc.py
+++ b/buildtools/autogen/autogen/msc.py
@@ -308,6 +308,10 @@ def msc_dep(fd, tar, deplist, msc):
                 sep = " "
         else:
             print("!WARNING: dropped absolute dependency " + d)
+    if ext == "tab.c":
+        # add dependency on bison-generated include file so that it gets 
produced first
+        fd.write('%s"%s.tab.h"' % (sep, b))
+        sep = " "
     if sep == " ":
         fd.write("\n")
     for x, y in _in:
@@ -330,7 +334,7 @@ def msc_dep(fd, tar, deplist, msc):
         fd.write(getsrc)
         x, de = split_filename(deplist[0])
         of = b + '.' + de
-        fd.write('\t$(BISON) -o %s.tab.c --defines=%s.tmph.h $(YFLAGS) 
$(AM_YFLAGS) %s\n' % (b, b, of))
+        fd.write('\t$(BISON) -o %s.tab.c $(YFLAGS) $(AM_YFLAGS) %s\n' % (b, 
of))
         fd.write('\trm -f %s.tmph.h\n' % b)
     elif ext in ("obj", "tab.obj"):
         target, name = msc_find_target(tar, msc)
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to