2001-02-17 00:42:47 +00:00
|
|
|
#!/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.
|
|
|
|
#
|
2001-02-17 15:56:52 +00:00
|
|
|
# If you use a ? in your path name, you lose, see sed command below.
|
2001-02-17 00:42:47 +00:00
|
|
|
|
2001-03-08 21:42:11 +00:00
|
|
|
export LC_ALL=POSIX
|
|
|
|
export LC_CTYPE=POSIX
|
|
|
|
|
2001-02-17 15:56:52 +00:00
|
|
|
DIR=${0%%/pristine_setup.sh}
|
2001-02-17 00:42:47 +00:00
|
|
|
if [ ! -d $DIR ]; then
|
|
|
|
echo "unexpected problem: $DIR is not a directory. Aborting pristine setup"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo " "
|
|
|
|
|
|
|
|
if [ -e ./Config.h ]; then
|
2001-02-17 15:56:52 +00:00
|
|
|
echo "./Config.h already exists: not overwriting"
|
|
|
|
exit
|
2001-02-17 00:42:47 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -e ./Makefile ]; then
|
|
|
|
echo "./Makefile already exists: not overwriting"
|
|
|
|
fi
|
|
|
|
|
2001-02-17 15:56:52 +00:00
|
|
|
sed -e "s?BB_SRC_DIR =.*?BB_SRC_DIR = $DIR?" <$DIR/Makefile >Makefile || exit
|
|
|
|
cp $DIR/Config.h Config.h || exit
|
|
|
|
#mkdir -p pwd_grp
|
2001-02-17 00:42:47 +00:00
|
|
|
|
|
|
|
echo " "
|
|
|
|
echo "You may now type 'make' to build busybox in this directory"
|
|
|
|
echo "($PWD) using the pristine sources in $DIR"
|
|
|
|
echo " "
|
|
|
|
|