News for hackers. Stuff that matters.
Re:Knit: Making a Better Make by svilen_dobrev on Saturday April 08, 2023 @09:17AM (#35492825)
the list of inconveniences is missing the biggest (and sadly, unchangeable) pain-point of Make: targets/deps/filenames cannot have spaces in them..

and, it cannot have multiple wildcard-patterns, like %xyz%, only single %xyzabc or abcxyz%, and this brings much complicatedness into picture..

Re:Knit: Making a Better Make by dundarious on Saturday April 08, 2023 @01:21PM (#35495487)
Knit supports regex rule patterns so I assume the latter issue is resolved in knit in one form or another.
Re:Knit: Making a Better Make by zyedidia on Saturday April 08, 2023 @01:52PM (#35495843)
I haven't run into these pain points much with Make, but Knit does support spaces in targets/prerequisites (use single or double quotes to surround the name). For the second point, Knit has regex rules (a Plan9 Mk feature) that can allow multiple grouped matches. The example from the article is:

    $ ($name-(.*)-(.*)):RB:
        GOOS=$match2 GOARCH=$match3 go build -o $match1
which is a metarule that matches targets like `$name-linux-amd64` and can be used for easy cross compilation with Go. Of course since it allows full regular expressions, even more complicated rules are allowed.