From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: Bakul Shah Date: Tue, 20 Nov 2007 13:01:49 -0800 Message-Id: <20071120210149.B6F855B3E@mail.bitblocks.com> Subject: [9fans] p9p mk issue Topicbox-Message-UUID: 03f4f590-ead3-11e9-9d60-3106f5b1d025 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