From a7adbf20a91566510f61aa1c3c5193d3ff898d53 Mon Sep 17 00:00:00 2001 From: Explorer09 Date: Mon, 2 Jan 2017 20:10:58 +0800 Subject: build: Add dist-hook to force remake scan.c. This will ensure the flex scanner included in release tarball being generated by exactly the flex version to be released. Here's one catch after this change: You may not run "make dist" or "make distdir" if you configure the flex source to be cross-compiled. --- src/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 12b2327..2db07ef 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -91,6 +91,10 @@ stage1scan.c: scan.c sed 's|^\(#line .*\)"'`printf %s $< | sed 's|[][\\\\.*]|\\\\&|g'`'"|\1"$@"|g' $< > $@ endif +dist-hook: scan.l flex$(EXEEXT) + ./flex$(EXEEXT) -o scan.c $< && \ + mv scan.c $(distdir) + # make needs to be told to make parse.h so that parallelized runs will # not fail. -- cgit v1.2.3