summaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorAkim Demaille <akim@lrde.epita.fr>2015-12-04 16:37:03 +0100
committerWill Estes <westes575@gmail.com>2015-12-04 15:07:11 -0500
commit4cea6bfe5484ea99cd017bb24a27b54b87601386 (patch)
tree32af7cf678aad178b5062b6e759b2247cb28eb1b /src/Makefile.am
parent7ddfe81aa8a0a1ccd02618187a0e4322be96f76c (diff)
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.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am11
1 files 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'