[coreboot] Using only one romcc copy
Mats Erik Andersson
mats.andersson at gisladisker.se
Tue Sep 2 00:13:43 CEST 2008
Hello all,
I submit here a little utility that slightly rebuilds the python
generated makefiles
targets/*/*/Makefile
targets/*/*/normal/Makefile
targets/*/*/fallback/Makefile
in order to use a common copy of romcc, and to leave this compiler
until 'make build-clean' is issued. If the result is to peoples
liking, the corresponding changes should be implemented in the
master copies used by 'buildtargets'.
The rebuild is conducted any time after 'buildtargets' and
is as easy as
# reduce.sh targets/msi/ms6147/ms6147
Best regards
Mats Erik Andersson
---
#!/bin/sh
#
# A rebuild tool for three makefiles, that reduces some idiosyncracies of
# the build system regarding the romcc compiler.
#
if [ -z "$1" ];then
echo "A target directory is mandatory. Aborting."
exit 1
fi
if [ ! -s "$1/Makefile" ]; then
echo "Wrong directory, or \"Makefile\" is missing."
exit 1
fi
# Move the executable romcc copy to parent directory in all targets,
# dependencies, and build rules.
sed -i 's|\.\+/romcc|\.\./romcc|' $1/normal/Makefile
sed -i 's|\.\+/romcc|\.\./romcc|' $1/fallback/Makefile
# Introduce, if necessary, a new target that removes the common romcc.
if grep -q '^build-clean' $1/Makefile
then
:
else
sed -i '/^clean/ i\
build-clean:\tclean\
\t-rm romcc\
;' $1/Makefile
fi
More information about the coreboot
mailing list