build.sh: revision 1.374
build.sh: add support for git worktree
Git supports multiple working trees attached to the same repository,
with the git-worktree(1) subcommand.
When building from a Git working tree, the repository metadata in .git
from the top source directory is a file (containing the actual location
of the metadata) instead of the usual directory structure. With this
change, build.sh allows .git to be a directory or a regular file
instead, therefore letting the sources build as expected from a Git
working tree.
To test: (without this patch)
src$ git worktree add ../src-clean-tree
[...]
src$ (cd ../src-clean-tree && ./build.sh tools)
[...]
ERROR: Cannot determine VCS for '.../src-clean-tree/'
build.sh: revision 1.366 via patch
Avoid the dependency on a populated tooldir (or building the tools)
when simply doing mkrepro-timestamp and the current repository setups
does not actually require it.
build.sh: revision 1.348
build.sh: revision 1.349
build.sh: revision 1.350
build.sh: revision 1.351
build.sh: revision 1.352
build.sh: revision 1.356
ignore cvslatest errors in expert mode
Handle git and mercurial for reproducible builds.
for mercurial, use the latest revision instead of limiting the output to 1
(requested by joerg)
handle different flavors of date(1)
kre@ does not like the subshell :-)
Add a new operation "mkrepro-timestamp" to extract the timestamp a
build with -P would use. Example usage:
./build.sh -T /usr/tools -P mkrepro-timestamp
This allows us to extract this information once, make other use of it,
and replicate it on other machines with -V MKREPRO=yes -V MKREPRO_TIMESTAMP=..
from the uname -p value already fetched.
this means eg, build.sh on evbarm will build the native platform rather
than "earm" (armv5) -- which was the default even on arm64 hosts.
- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
it trivial to add a list of banned var names for either of those args
should that ever be considered desireable (as the XXX suggests it might.)
I've had this mod locked in my tree for (at least) months - time to set it free.
it is not "good" just because ../xsrc or /usr/xsrc exists, if the user said
-X /no/xsrc/here ... Further, when we find it, remember it.
While here, also look in my favourite place: .../src/xsrc - src/x would be
better (or src/x11) but that's too hard given the cvs module name and src
tarball format.
sys/net/if_module.h, build.sh rumptest of -lrumpnet_virtif now also
requires -lrumpdev -lrumpvfs for if_loop.c:config_cfdriver_attach()
and kern_pmf.c:do_sys_sync().
exclude any skell builtin. There are two ways to guarantee exec'ing
a binary, using a path, or using exec. To use a path we would need to
find it first (which certainly could be done.) Using exec here is easier.
because although the arch-specific make wrapper sets $MAKEFLAGS to include
the proper system Makefile path, configure clears $MAKEFLAGS before it invokes
$MAKE to figure out which dependency style to use. This made the build fail
during the gcc build.
Also remove or simplify older code that did the same thing in a
different way. The old code handled most cases, but did not change
op=kernel.gdb to op=kernel_gdb.
is supposed override MACHINE_ARCH from the environment with the
default MACHINE_ARCH for the requested machine.
Add and use an opt_m variable to enforce this.
This lists all known MACHINE/MACHINE_ARCH values, optionally
filtered by glob patterns given in the "-m" and "-a" options.
For example: build.sh -a '*arm*' list-arch
* Elide some unnecessary pairs of quotation marks, to improve readability.
For example, shell_quote "''" is now \'\' instead of ''\'''\'''.
* Don't add quotes around words that contain only safe characters,
to improve readability.
* LC_COLLATE=C to prevent [a-zA-Z] from matching non-ASCII characters.
* Use ${SED} if defined.