The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: bakul@bitblocks.com (Bakul Shah)
Subject: [TUHS] remaking make (Re: Another "craft" discussion topic - mindless tool proliferation
Date: Fri, 22 Sep 2017 13:09:50 -0700	[thread overview]
Message-ID: <20170922201005.79953156E523@mail.bitblocks.com> (raw)
In-Reply-To: Your message of "Thu, 21 Sep 2017 18:08:05 -0700." <20170922010805.GO25650@mcvoy.com>

On Thu, 21 Sep 2017 18:08:05 -0700 Larry McVoy <lm at mcvoy.com> wrote:
> 
> 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.

Google's bazel seems to have a good model and abstraction
facility.  For example, to build a C++ binary from
{foo,main}.cc you can use

cc_binary(
	name = "foo",
	srcs = ["foo.cc", "main.cc"],
	hdrs = ["foo.h"],
)

The cc_binary macro encapsulates the common pattern for
building c++ binaries, and allows you to specify just the
essential (and optional) parameters.  You can also define your
own rules (and this is how they are adding go support).

Its implementation seems to rather heavy weight (its binary
installer (without jdk8) for Macs is 111MB) and there are a
number of other isses so I wouldn't want to use it but it is
good for mining ideas.  Building something much simpler that
serves the needs of most projects should be possible.  May
even be worth experimenting using an s-expression syntax.
Then the above example becomes

(cc-binary 'foo
  (srcs '(foo.cc main.cc))
  (hdrs '(foo.h)))

Shorter and much less clutter!  Ideally the program should
have just have meta rule built-in and everything else can be
bootstrapped but it may be advantageous to "precompile" some
rules....



  reply	other threads:[~2017-09-22 20:09 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 17:01 [TUHS] " Jon Steinhart
2017-09-19 17:05 ` Steve Nickolas
2017-09-19 20:31   ` Pete Turnbull
2017-09-19 20:37     ` Warner Losh
2017-09-19 23:35 ` Theodore Ts'o
2017-09-20  0:47   ` Lyndon Nerenberg
2017-09-20  1:02     ` Larry McVoy
2017-09-20  1:09       ` Lyndon Nerenberg
2017-09-20  1:13         ` Larry McVoy
2017-09-20  1:22           ` Larry McVoy
2017-09-20  2:01             ` Larry McVoy
2017-09-20  2:34               ` Bakul Shah
2017-09-20  2:47                 ` Larry McVoy
2017-09-20  6:18                   ` Bakul Shah
2017-09-20  4:35                 ` Grant Taylor
2017-09-20  5:54                   ` Ian Zimmerman
2017-09-24 23:03                 ` Ralph Corderoy
2017-09-24 23:35                   ` Bakul Shah
2017-09-20 16:49             ` Steffen Nurpmeso
2017-09-20  4:29         ` Grant Taylor
2017-09-20  6:43         ` Peter Jeremy
2017-09-20  8:25           ` Bakul Shah
2017-09-20  9:12             ` Steve Nickolas
2017-09-20  9:34               ` Bakul Shah
2017-09-20 16:48         ` Steffen Nurpmeso
2017-09-20  2:07       ` Theodore Ts'o
2017-09-24 22:58         ` Ralph Corderoy
2017-09-20  4:26       ` Grant Taylor
2017-09-20 16:45     ` Steffen Nurpmeso
2017-09-21 17:33     ` Tony Finch
2017-09-21 18:39       ` Steffen Nurpmeso
2017-09-22  0:02         ` Greg 'groggy' Lehey
2017-09-22  0:30           ` Lyndon Nerenberg
2017-09-22  0:38             ` Larry McVoy
2017-09-22  0:39               ` Lyndon Nerenberg
2017-09-22  0:50                 ` Larry McVoy
2017-09-22  1:01                   ` Lyndon Nerenberg
2017-09-22  1:08                     ` Larry McVoy
2017-09-22 20:09                       ` Bakul Shah [this message]
2017-09-22  2:25                   ` Warner Losh
2017-09-22  3:26               ` Greg 'groggy' Lehey
2017-09-22  4:09                 ` ron minnich
2017-09-22  2:20             ` Warner Losh
2017-09-22  0:36           ` Larry McVoy
2017-09-22  0:40             ` Lyndon Nerenberg
2017-09-22  1:53             ` Michael Parson
2017-09-22  3:25       ` Grant Taylor
2017-09-20  6:20   ` Lars Brinkhoff
2017-09-20 16:39   ` Steffen Nurpmeso
2017-09-24 22:54   ` Ralph Corderoy
2017-09-25  0:16     ` Steve Johnson
2017-09-25 11:30       ` Ralph Corderoy
2017-09-20 18:15 ` Clem Cole
2017-09-20 18:35   ` Jon Steinhart

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=20170922201005.79953156E523@mail.bitblocks.com \
    --to=bakul@bitblocks.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 NNTP newsgroup(s).