Sime makelike wrapper scripts support
Natanael Copa
ncopa at alpinelinux.org
Tue Jan 14 07:21:25 UTC 2020
On Mon, 13 Jan 2020 10:30:59 +0000
Ron Yorston <rmy at pobox.com> wrote:
> Boris wrote:
> >Sure, to avoid any confusion I would't use the name "Makefile".
> >"Minimake" sounds clear to me, and the cli `mim`.
>
> I like the command name 'mim' (which Merriam-Webster tells me is an
> adjective meaning 'affectedly shy or modest'). By extension I think the
> file should be called 'Mimfile'. This avoids any misleading reference to
> make. As Eli correctly points out (and I should have) the script misses
> the main distinguishing feature of make, that it handles dependencies.
>
> I've tidied up the script a bit. Its usage is:
>
> mim [-f FILE] [SHELL_OPTIONS] [TARGET] ...
>
Other implementation that converts the "targets" to shell functions:
--- mim --------
#!/bin/sh
sed -E -e '/^[a-z]+:$/,/^$/{
/^[a-z]/s/:$/() \{/
s/^$/\}/
}' -e '$a for i; do $i; done' Mimfile | sh -e -s "$@"
-----------------
This will run all specified targets instead of passing options.
(I'm still not convinced it is a good idea to add this to busybox)
-nc
More information about the busybox
mailing list