Commit Graph

22 Commits

Author SHA1 Message Date
Michael Forney 8f62705628 Remove recursive setup.lua operation
This was inherited from when the gen scripts were written in rc and
it was too slow to run the whole thing when any individual package
changed. This is not an issue in Lua, and switching to a single
invocation will allow for future improvements such as relying more
on the Lua package system.
2026-03-12 15:50:43 -07:00
Michael Forney a02412b363 Move oasis git helpers to skeleton package 2021-07-24 18:08:16 -07:00
Michael Forney fccac025c3 Compress root.tar with zstd 2021-06-27 01:51:57 -07:00
Michael Forney f910bf367c Rename some fspec files 2021-05-27 01:19:21 -07:00
Michael Forney de279e612e Build root.tar from fspec rather than git repository 2020-06-22 23:33:21 -07:00
Michael Forney 5cbbb9e377 Use hyphenated rule names 2020-06-22 23:07:53 -07:00
Michael Forney b5bf3a93d8 Use $outdir instead of $builddir 2020-06-22 22:59:35 -07:00
Michael Forney b4ced98b9d Generate root.perms from fspec 2020-06-22 22:59:35 -07:00
Michael Forney 677859db25 Exclude .gitignore and .perms from fspec 2020-06-22 22:47:59 -07:00
Michael Forney 08cca5431f Move toolchain config into config.lua 2020-01-29 22:14:33 -08:00
Michael Forney 051963c7fe Add support for building multiple configurations
Now, you can build in separate directories per configuration:

	mkdir foo
	(cd foo && ../setup.lua)
	samu -C foo
2020-01-29 22:14:33 -08:00
Michael Forney 2255c43da7 Use $basedir to refer to paths relative to base source tree 2019-12-16 23:48:22 -08:00
Michael Forney f4720910b9 Update ninja requirement to 1.8.0 and don't bother with atomic outputs
Since ninja 1.8.0[0] and samurai 0.2[1], output mtime is always
recorded after a job succeeds, and outputs are considered dirty if
the recorded mtime is older than any input. This means that even
if a command partially writes its output then fails (for example,
if run with stdout redirected to a file), it will still get re-run
during the next build.

This means that outputs no longer have to be written atomically
(i.e. renamed into place) in order to ensure a correct build, and
we can drop the idiom `command >$out.tmp && mv $out.tmp $out`.

[0] https://github.com/ninja-build/ninja/commit/04d886b11041bb59d01df794cce7a1e8cad2250d
[1] https://github.com/michaelforney/samurai/commit/799bc5a4719b90a1026c129b55b92c0bccf97eeb
2019-11-17 15:24:25 -08:00
Michael Forney f16ecebbc4 No C++ components anymore 2019-07-06 01:24:36 -07:00
Michael Forney 741d252822 Port build scripts to POSIX shell
Since we are now using Lua to generate ninja files, use of rc in build scripts
seems unnecessary and adds an additional bootstrap dependency. None of them are
too fancy, so just port to POSIX sh instead.
2018-02-16 02:52:34 -08:00
Michael Forney e7d708d073 Set ninja_required_version
We use features through ninja version 1.7 (implicit outputs).

Fixes #4.
2017-10-29 20:33:56 -07:00
Michael Forney 003dbc7488 Move defaults to config.def.lua 2017-10-24 02:01:14 -07:00
Michael Forney 224b5fdbf9 Add mechanism to probe for toolchain features 2017-10-23 21:43:52 -07:00
Michael Forney 6026883449 Remove need for build.ninja and config.ninja 2017-10-20 21:52:13 -07:00
Michael Forney 677b59c07c Move some stuff from build.ninja to gen.lua 2017-10-20 21:36:30 -07:00
Michael Forney a5d613ce95 Remove stray comment 2017-10-06 12:56:35 -07:00
Michael Forney ba94a8513d Rewrite ninja generation scripts in Lua 2017-09-25 19:23:06 -07:00