summaryrefslogtreecommitdiff
path: root/x2p/Makefile.SH
diff options
context:
space:
mode:
Diffstat (limited to 'x2p/Makefile.SH')
-rwxr-xr-xx2p/Makefile.SH46
1 files changed, 12 insertions, 34 deletions
diff --git a/x2p/Makefile.SH b/x2p/Makefile.SH
index 393a335e0b..19d4205f38 100755
--- a/x2p/Makefile.SH
+++ b/x2p/Makefile.SH
@@ -17,11 +17,6 @@ case "$0" in
*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
esac
-: Configure sets byacc=byacc if byacc is not found. We reset it to ''
-case "$byacc" in
-'byacc') byacc='';;
-esac
-
echo "Extracting x2p/Makefile (with variable substitutions)"
rm -f Makefile
cat >Makefile <<!GROK!THIS!
@@ -77,36 +72,19 @@ all: $(public) $(private) $(util)
a2p: $(obj) a2p.o
$(CC) $(LDFLAGS) $(obj) a2p.o $(libs) -o a2p
-!NO!SUBS!
-
-: Only print out the rules for running byacc if the user _has_ byacc.
-: Otherwise, comment them out. Users who really know what they are
-: doing can uncomment them and run yacc or bison or whatever.
-: Configure sets byacc=byacc if byacc is not found.
-case "$byacc" in
-'')
- comment1='#'
- comment2='' ;;
-*) comment1=''
- comment2='#' ;;
-esac
-
-$spitshell >>Makefile <<!GROK!THIS!
-
# I now supply a2p.c with the kits, so the following section is
-# commented out if you don't have byacc.
-
-${comment1}a2p.c: a2p.y
-${comment1} @ echo Expect many shift/reduce and reduce/reduce conflicts
-${comment1} \$(BYACC) a2p.y
-${comment1} mv y.tab.c a2p.c
-
-# This version is used if you do not have byacc.
-${comment2}a2p.c: a2p.y
-${comment2} touch a2p.c
-
-!GROK!THIS!
-cat >>Makefile <<'!NO!SUBS!'
+# used only if you force byacc to run by saying
+# make run_byacc
+
+run_byacc:
+ @ echo Expect many shift/reduce and reduce/reduce conflicts
+ $(BYACC) a2p.y
+ mv y.tab.c a2p.c
+
+# We don't want to regenerate a2p.c, but it might appear out-of-date
+# after a patch is applied or a new distribution is made.
+a2p.c: a2p.y
+ - touch a2p.c
a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h str.h hash.h
$(CCCMD) $(LARGE) a2p.c