diff options
author | Eric Andersen | 2001-02-17 00:42:47 +0000 |
---|---|---|
committer | Eric Andersen | 2001-02-17 00:42:47 +0000 |
commit | 19f86207f5c9cdcd192295e3ac3130a40f180d39 (patch) | |
tree | d84d5ef8a6914a3a2b77c360471d195f0c32a8e2 /pristine_setup.sh | |
parent | 69c8572f296380df78a20818ca9208b35b7dbd16 (diff) | |
download | busybox-19f86207f5c9cdcd192295e3ac3130a40f180d39.zip busybox-19f86207f5c9cdcd192295e3ac3130a40f180d39.tar.gz |
Update the build system for pristine source directory builds. This
update is primarily work done by Larry Doolittle, but I did some
touchups of my own to make it work for me,
-Erik
Diffstat (limited to 'pristine_setup.sh')
-rwxr-xr-x | pristine_setup.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pristine_setup.sh b/pristine_setup.sh new file mode 100755 index 0000000..dca278c --- /dev/null +++ b/pristine_setup.sh @@ -0,0 +1,39 @@ +#!/bin/sh +# +# To compile BusyBox without touching the original sources +# (as might be interesting for multi-target builds), create +# an empty directory, cd into it, and run this program by +# giving its explicit path (kind of like how you would run +# configure, if BusyBox had one). Then you should be ready +# to "make". Files in the build tree, in particular Config.h, +# will override those in the pristine source tree. +# + + +# if you use a ? in your path name, you lose. +DIR=`basedir ${0%%/pristine_setup}` +if [ ! -d $DIR ]; then + echo "unexpected problem: $DIR is not a directory. Aborting pristine setup" + exit +fi + +echo " " + +if [ -e ./Config.h ]; then + echo "./Config.h already exists: not overwriting" +else + cp $DIR/Config.h Config.h +fi + +if [ -e ./Makefile ]; then + echo "./Makefile already exists: not overwriting" +else + sed -e "s?BB_SRC_DIR =?BB_SRC_DIR = $DIR?" <$DIR/Makefile >Makefile || exit +fi + + +echo " " +echo "You may now type 'make' to build busybox in this directory" +echo "($PWD) using the pristine sources in $DIR" +echo " " + |