diff options
author | Explorer09 <explorer09@gmail.com> | 2016-11-26 23:47:12 +0800 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2016-12-29 17:26:07 -0500 |
commit | adddfba7ab9f640e9d02819909e53b7a220766ba (patch) | |
tree | 5a52f6438922449d72dbe87aca7cd9125966d145 /src/Makefile.am | |
parent | 6964073c594cf999d3747993b73f707e4702e024 (diff) |
build: New configure option '--disable-bootstrap'.
If configure is run with '--disable-bootstrap', then stage1flex won't
be built and stage1scan.c will be generated by sed'ing scan.c.
This option is intended to workaround bootstrap bugs rather than to
fix the bootstrapping issues which are proving subtler and harder to
fix than anyone would like.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r-- | src/Makefile.am | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index a4742fd..3b5e362 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,7 +6,9 @@ LIBS = @LIBS@ m4 = @M4@ bin_PROGRAMS = flex +if ENABLE_BOOTSTRAP noinst_PROGRAMS = stage1flex +endif if ENABLE_LIBFL lib_LTLIBRARIES = libfl.la @@ -82,16 +84,21 @@ skel.c: flex.skl mkskel.sh flexint.h tables_shared.h tables_shared.c $(SHELL) $(srcdir)/mkskel.sh > $@.tmp mv $@.tmp $@ +if ENABLE_BOOTSTRAP stage1scan.c: scan.l stage1flex$(EXEEXT) ./stage1flex$(EXEEXT) $(AM_LFLAGS) $(LFLAGS) -o $@ $< +else +stage1scan.c: scan.c + sed 's|^\(#line .*\)"'`printf %s $< | sed 's|[][\\\\.*]|\\\\&|g'`'"|\1"$@"|g' $< > $@ +endif # make needs to be told to make parse.h so that parallelized runs will # not fail. -main.c : parse.h -scan.c : parse.h -stage1scan.c : parse.h -yylex.c : parse.h +main.c: parse.h +yylex.c: parse.h +stage1flex-scan.$(OBJEXT): parse.h +flex-stage1scan.$(OBJEXT): parse.h # Run GNU indent on sources. Don't run this unless all the sources compile cleanly. # |