From: Krister Walfridsson <cato@df.lth.se>
To: egcs@cygnus.com
Subject: Re: M4 problems
Date: Mon, 13 Apr 1998 06:43:00 -0000 [thread overview]
Message-ID: <Pine.LNX.3.96.980413154041.7042A-100000@bartlet.df.lth.se> (raw)
Here are the changes needed to handle M4 the same way as YACC
and LEX.
/Krister
Mon Apr 13 15:20:40 1998 Krister Walfridsson <cato@df.lth.se>
* configure: Define DEFAULT_M4 by searching PATH.
* Makfile.in: Use DEFAULT_M4.
*** configure.old Fri Apr 10 19:36:19 1998
--- configure Mon Apr 13 15:05:50 1998
***************
*** 762,767 ****
--- 762,786 ----
test -n "$DEFAULT_YACC" && break
done
+ # Generate a default definition for M4. This is used if the makefile can't
+ # locate m4 in objdir.
+
+ for prog in gm4 gnum4 m4
+ do
+ set dummy $prog; tmp=$2
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
+ for dir in $PATH; do
+ test -z "$dir" && dir=.
+ if test -f $dir/$tmp; then
+ DEFAULT_M4="$prog"
+ break
+ fi
+ done
+ IFS="$save_ifs"
+
+ test -n "$DEFAULT_M4" && break
+ done
+
# Generate a default definition for LEX. This is used if the makefile can't
# locate flex in objdir.
***************
*** 1259,1264 ****
--- 1278,1284 ----
-e "s|^tooldir[ ]*=.*$|tooldir = ${tooldir}|" \
-e "s:^DEFAULT_YACC[ ]*=.*$:DEFAULT_YACC = ${DEFAULT_YACC}:" \
-e "s:^DEFAULT_LEX[ ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
+ -e "s:^DEFAULT_M4[ ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \
${subdir}/Makefile.tem >> ${Makefile}
# If this is a Canadian Cross, preset the values of many more
*** Makefile.in.old Mon Apr 13 13:29:20 1998
--- Makefile.in Mon Apr 13 14:56:17 1998
***************
*** 100,105 ****
--- 100,106 ----
# These values are substituted by configure.
DEFAULT_YACC = yacc
DEFAULT_LEX = lex
+ DEFAULT_M4 = m4
BISON = `if [ -f $$r/bison/bison ] ; then \
echo $$r/bison/bison -L $$s/bison/ ; \
***************
*** 121,127 ****
M4 = `if [ -f $$r/m4/m4 ] ; \
then echo $$r/m4/m4 ; \
! else echo m4 ; fi`
MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
then echo $$r/texinfo/makeinfo/makeinfo ; \
--- 122,128 ----
M4 = `if [ -f $$r/m4/m4 ] ; \
then echo $$r/m4/m4 ; \
! else echo ${DEFAULT_M4} ; fi`
MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
then echo $$r/texinfo/makeinfo/makeinfo ; \
next reply other threads:[~1998-04-13 6:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-04-13 6:43 Krister Walfridsson [this message]
1998-04-14 13:21 ` Jeffrey A Law
-- strict thread matches above, loose matches on Subject: below --
1998-04-04 14:20 Krister Walfridsson
1998-04-05 10:02 ` Ian Lance Taylor
1998-04-05 17:27 ` Jeffrey A Law
1998-04-06 3:15 ` Richard Earnshaw
1998-04-06 8:26 ` Ian Lance Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.3.96.980413154041.7042A-100000@bartlet.df.lth.se \
--to=cato@df.lth.se \
--cc=egcs@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).