mirror of
https://github.com/acpica/acpica/
synced 2024-12-25 03:46:53 +03:00
Linux makefiles: add helper scripts to run linux makefiles from git tree.
The final linux tree is slightly different, these scripts allow testing of the makefiles.
This commit is contained in:
parent
96e28acc9e
commit
1d6a2cb464
47
generate/linux/buildall.sh
Executable file
47
generate/linux/buildall.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#
|
||||
# buildall - Build all ACPI utilities
|
||||
# usage:
|
||||
# buildall [clean | install]
|
||||
#
|
||||
BUILD_COUNT=0
|
||||
STATUS=0
|
||||
|
||||
#
|
||||
# Common exit. Assumes $STATUS has been set.
|
||||
#
|
||||
exit_build()
|
||||
{
|
||||
if [ $STATUS -ne 0 ]; then
|
||||
echo "*** build $1 FAILED $STATUS"
|
||||
fi
|
||||
|
||||
echo "*** $BUILD_COUNT successful builds"
|
||||
exit $STATUS
|
||||
}
|
||||
|
||||
#
|
||||
# Build one utility
|
||||
#
|
||||
do_build()
|
||||
{
|
||||
./buildone.sh $1 $2
|
||||
STATUS=$?
|
||||
if [ $STATUS -ne 0 ]; then
|
||||
exit_build $1
|
||||
fi
|
||||
|
||||
BUILD_COUNT=`expr $BUILD_COUNT + 1`
|
||||
}
|
||||
|
||||
#
|
||||
# Build all utilities
|
||||
#
|
||||
do_build iasl $1
|
||||
do_build acpiexec $1
|
||||
do_build acpinames $1
|
||||
do_build acpixtract $1
|
||||
do_build acpihelp $1
|
||||
do_build acpisrc $1
|
||||
do_build acpibin $1
|
||||
|
||||
exit_build
|
66
generate/linux/buildone.sh
Executable file
66
generate/linux/buildone.sh
Executable file
@ -0,0 +1,66 @@
|
||||
#
|
||||
# buildone - Build one ACPI utility
|
||||
# usage:
|
||||
# buildone <UtilityName> [clean | install]
|
||||
#
|
||||
mkdir -p bin
|
||||
|
||||
#
|
||||
# Setup directories
|
||||
#
|
||||
if [ $1 = iasl ]; then
|
||||
BUILD_SOURCE=../../source/compiler
|
||||
START_DIR=../..
|
||||
else
|
||||
BUILD_SOURCE=../../source/tools/$1
|
||||
START_DIR=../../..
|
||||
fi
|
||||
|
||||
#
|
||||
# Copy the makefile to the target directory
|
||||
#
|
||||
cp Makefile.$1 $BUILD_SOURCE/Makefile
|
||||
|
||||
#
|
||||
# Implementation of "buildall clean" and "buildall install"
|
||||
#
|
||||
if [ "$2" != "" ]; then
|
||||
if [ $2 = clean ]; then
|
||||
|
||||
# cleanup
|
||||
|
||||
echo "*** clean $1"
|
||||
cd $BUILD_SOURCE
|
||||
make ACPICA_COMPONENTS="/components" clean
|
||||
rm Makefile
|
||||
exit 0
|
||||
elif [ $2 = install ]; then
|
||||
|
||||
# intall program
|
||||
|
||||
echo "*** install $1"
|
||||
cd $BUILD_SOURCE
|
||||
make ACPICA_COMPONENTS="/components" install
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Build the utility
|
||||
#
|
||||
rm -f bin/$1
|
||||
cd $BUILD_SOURCE
|
||||
echo "*** make $1 (from $BUILD_SOURCE)"
|
||||
|
||||
make ACPICA_COMPONENTS="/components"
|
||||
STATUS=$?
|
||||
if [ $STATUS -ne 0 ]; then
|
||||
echo "*** make $1 FAILED $STATUS"
|
||||
else
|
||||
cp $1.exe $START_DIR/generate/linux/bin
|
||||
fi
|
||||
|
||||
cd $START_DIR/generate/linux
|
||||
echo "*** completed $1"
|
||||
exit $STATUS
|
||||
|
Loading…
Reference in New Issue
Block a user