From 4cea6bfe5484ea99cd017bb24a27b54b87601386 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Fri, 4 Dec 2015 16:37:03 +0100 Subject: [PATCH] Generated skel.c explicitly in srcdir. Rewrote the target for skel.c to explicitly mention the srcdir. This should help when building flex from a directory outside the flex tree. Spread the rule out over several lines to enhance readability. --- src/Makefile.am | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 6dc14e8..475120c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -66,8 +66,15 @@ EXTRA_DIST = \ MAINTAINERCLEANFILES = skel.c -skel.c: flex.skl mkskel.sh flexint.h tables_shared.h - sed 's/m4_/m4postproc_/g; s/m4preproc_/m4_/g' $(srcdir)/flex.skl | $(m4) -P -DFLEX_MAJOR_VERSION=`echo $(VERSION)|cut -f 1 -d .` -DFLEX_MINOR_VERSION=`echo $(VERSION)|cut -f 2 -d .` -DFLEX_SUBMINOR_VERSION=`echo $(VERSION)|cut -f 3 -d .` | sed 's/m4postproc_/m4_/g' | $(SHELL) $(srcdir)/mkskel.sh >skel.c +$(srcdir)/skel.c: flex.skl mkskel.sh flexint.h tables_shared.h + sed 's/m4_/m4postproc_/g; s/m4preproc_/m4_/g' $(srcdir)/flex.skl | \ + $(m4) -P -I $(srcdir) \ + -DFLEX_MAJOR_VERSION=` echo $(VERSION)|cut -f 1 -d .` \ + -DFLEX_MINOR_VERSION=` echo $(VERSION)|cut -f 2 -d .` \ + -DFLEX_SUBMINOR_VERSION=`echo $(VERSION)|cut -f 3 -d .` | \ + sed 's/m4postproc_/m4_/g' | \ + $(SHELL) $(srcdir)/mkskel.sh >skel.c.tmp + mv skel.c.tmp $(srcdir)/skel.c # Explicitly describe dependencies. # You can recreate this with `gcc -I. -MM *.c' -- 2.40.0