bitfield / script

Making it easy to write shell-like scripts in Go
MIT License
5.5k stars 313 forks source link

Makefile replacement #198

Open abitrolly opened 10 months ago

abitrolly commented 10 months ago

Is it possible to add some primitives to https://github.com/bitfield/script for primitive Makefile replacement?

I have no idea how it would look like in Go syntax. Maybe borrow things from SCons? https://scons-cookbook.readthedocs.io/en/latest/

bitfield commented 10 months ago

Nice suggestion, @abitrolly, thanks! Maybe you could come up with a few examples of the sort of script program you'd like to write to replace a Makefile?

abitrolly commented 9 months ago

Well, there is a master issue here https://gitlab.com/gitlab-org/gitlab-development-kit/-/issues/166 which is a general rant about Makefile shenanigans.

Maybe something like this would be good for dependency tracking.

docs = target('./gitlab-docs).Clone('https://gitlab.com/gitlab-org/gitlab-docs')

main = target.Add(docs)

main.Build()