9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Pietro Gagliardi <pietro10@mac.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] p9p mk issue
Date: Tue, 20 Nov 2007 16:08:34 -0500	[thread overview]
Message-ID: <9259ABB2-2343-4E4A-83A4-2EE15DADA12F@mac.com> (raw)
In-Reply-To: <20071120210149.B6F855B3E@mail.bitblocks.com>

On Nov 20, 2007, at 4:01 PM, Bakul Shah wrote:

> Don't laugh but I am trying to use identical mkfiles on
> FreeBSD & plan9 for some programs and it seems this is
> impossible.
>
> Consider a simple mkfile like this:
>
> all:
> 	for (i in a b c)
> 		echo $i
>
> 9 mk fails with
> Syntax error: Bad for loop variable
> mk:    ...  : exit status=exit(2)
>
> On rereading the p9p mk man page I discover MKSHELL.  So next
> I add MKSHELL=... line at top of the above mkfile and now it
> works.  Since I want most mkfiles to be portable, I add this
> line in a mkfile included with < but it uses its own copy of
> MKSHELL.  So then I tried
>
> MKSHELL=$PLAN9/bin/rc 9 mk
>
> but that doesn't help either.  Change mkfile to this now
>
> MKSHELL=$PLAN9/bin/rc
> FOO=fum
> all:
> 	for (i in a b c)
> 		echo $i $MKSHELL $FOO
>
> But echo shows "a sh fum" etc. which is rather surprising.
>
> Rather than try this hard to please sh users, would it make
> sense to just use rc?  After all this is *plan9* mk!  To be
> nice mk can pay attention to MKSHELL env. variable but that's
> about it.  Even as a non-unix-hater I'd be perfectly happy
> with that!
>
> -- bakul

/sys/doc/mk.ps: read section 5 on variables. It might help :-)


  reply	other threads:[~2007-11-20 21:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-20 21:01 Bakul Shah
2007-11-20 21:08 ` Pietro Gagliardi [this message]
2007-11-20 21:44 ` Pietro Gagliardi
2007-11-20 22:20   ` Jeff Sickel
2007-11-20 22:48     ` Bakul Shah
2007-11-21  7:44       ` John Stalker
2007-11-21 16:01       ` Russ Cox
2007-11-21 18:01         ` Bakul Shah
2007-11-21 19:57           ` Pietro Gagliardi
2007-11-22 15:47           ` Russ Cox
2007-11-22 17:43             ` Bakul Shah
2007-11-22 18:20               ` Martin Neubauer
2007-11-22 19:48               ` Russ Cox
2007-11-30 18:01                 ` Bakul Shah
2007-11-30 19:01                   ` Russ Cox

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=9259ABB2-2343-4E4A-83A4-2EE15DADA12F@mac.com \
    --to=pietro10@mac.com \
    --cc=9fans@cse.psu.edu \
    /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 NNTP newsgroup(s).