* [TUHS] Another "make-raking" discussion topic
@ 2017-09-23 15:53 Norman Wilson
2017-09-23 18:09 ` Lyndon Nerenberg
0 siblings, 1 reply; 2+ messages in thread
From: Norman Wilson @ 2017-09-23 15:53 UTC (permalink / raw)
Lyndon Nerenberg:
I really like mk. 8ed was where it first rolled out? I remember
reading about it in the 10ed books. It's a joy to use in Plan 9.
======
Later than that. I was around when Andrew wrote mk, so it
definitely post-dated the 8/e manual.
mk does a number of things better, but to my mind not quite
enough to justify carrying it around. Just as I decided long
ago (once I'd come out of the ivory hothouse of Murray Hill)
that I was best off writing programs that hewed to the ISO C
and POSIX interfaces (and later put some work into bringing
my private copy of post-V10 nearer to the standards), because
that way I didn't have to think much about porting; so I
decided eventually that it is better just to use make.
As with any other language, of course, it's best to use it
in as simple a way as possible. So I don't care much whether
it's gmake or pmake or qmake as long as it implements more
or less the 7/e core subset without breaking anything.
Larry McVoy:
I do wish that some simple make had stuffed a scripting language in there.
Anything, tcl, lua, even (horrors, can't believe I'm saying this) a little
lisp. Or ideally a built in shell compat language. All those backslashes
to make shell scripts work get old.
======
This is something mk got right, and it's actually very simple to do:
every recipe is a shell script. Not a collection of lines handed
one by one to the shell, but a block of text. No backslashes (or
extra semicolons) required for tests. Each script is run with sh -e,
so by default one failed command will abort the rest, which is
usually what one wants; but if you don't want that you just insert
set +e
(So it's not that I dislike mk. Were it available as an easy
add-on package on all modern systems, rather than something I'd
have to carry around and compile, I'd be happy to use it.)
Norman Wilson
Toronto ON
^ permalink raw reply [flat|nested] 2+ messages in thread
* [TUHS] Another "make-raking" discussion topic
2017-09-23 15:53 [TUHS] Another "make-raking" discussion topic Norman Wilson
@ 2017-09-23 18:09 ` Lyndon Nerenberg
0 siblings, 0 replies; 2+ messages in thread
From: Lyndon Nerenberg @ 2017-09-23 18:09 UTC (permalink / raw)
> On Sep 23, 2017, at 8:53 AM, Norman Wilson <norman at oclsc.org> wrote:
>
> As with any other language, of course, it's best to use it
> in as simple a way as possible. So I don't care much whether
> it's gmake or pmake or qmake as long as it implements more
> or less the 7/e core subset without breaking anything.
For my Makefiles, I almost always add
.POSIX:
as the first line, to avoid inadvertently using [bgp]make extensions.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-23 18:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-23 15:53 [TUHS] Another "make-raking" discussion topic Norman Wilson
2017-09-23 18:09 ` Lyndon Nerenberg
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).