Commit 5962da0e authored by Claes Sjofors's avatar Claes Sjofors

Merge branch 'master' of newton:/data1/x0-0-0/pwr

parents 4e758ca8 6aaaf70c
...@@ -1080,7 +1080,7 @@ SERVER_BASED_SEARCH = NO ...@@ -1080,7 +1080,7 @@ SERVER_BASED_SEARCH = NO
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
# generate Latex output. # generate Latex output.
GENERATE_LATEX = YES GENERATE_LATEX = NO
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be # If a relative path is entered the value of OUTPUT_DIRECTORY will be
......
...@@ -67,6 +67,8 @@ if (($dbname = $ENV{"pwre_env_db"}) eq "") { ...@@ -67,6 +67,8 @@ if (($dbname = $ENV{"pwre_env_db"}) eq "") {
$os = substr( $ENV{"pwre_os"}, 3, 100); $os = substr( $ENV{"pwre_os"}, 3, 100);
$hw = substr( $ENV{"pwre_hw"}, 3, 100); $hw = substr( $ENV{"pwre_hw"}, 3, 100);
$configfile = $ENV{"pwre_broot"} . "/pwre_" . $hw . "_" . $os . ".cnf"; $configfile = $ENV{"pwre_broot"} . "/pwre_" . $hw . "_" . $os . ".cnf";
$parallel = $ENV{"PWRE_CONF_PARALLEL"};
printf( "Parallel %s\n", $parallel);
$arg1 = $ARGV[0]; $arg1 = $ARGV[0];
...@@ -1465,8 +1467,10 @@ sub _build () # args: branch, subbranch, flavour, phase ...@@ -1465,8 +1467,10 @@ sub _build () # args: branch, subbranch, flavour, phase
if ($hw eq "x86" && $real_hw eq "x86_64") { if ($hw eq "x86" && $real_hw eq "x86_64") {
$ENV{"cross_compile"} = "-m32"; $ENV{"cross_compile"} = "-m32";
} }
if (($branch eq "lib" && $subbranch ne "dtt") || $branch eq "wbl") {
if (($parallel eq "1" && $branch eq "lib" && $subbranch ne "dtt") || $branch eq "wbl") {
# All libraries and wbl files can be compiled in parallel # All libraries and wbl files can be compiled in parallel
printf( "Parallel %s", $parallel);
system("make -j @_") && exit 1; system("make -j @_") && exit 1;
} else { } else {
system("make @_") && exit 1; system("make @_") && exit 1;
......
...@@ -16,6 +16,8 @@ Arguments ...@@ -16,6 +16,8 @@ Arguments
--reset-version Reset previous version --reset-version Reset previous version
--lock-dbs Lock dbs-files. Dbs-files will not be rebuilt. --lock-dbs Lock dbs-files. Dbs-files will not be rebuilt.
--unlock-dbs Unlock dbs-files --unlock-dbs Unlock dbs-files
--parallel Build with parallel execution.
--not-parallel Don't build with parallel execution
EOF EOF
} }
...@@ -157,42 +159,42 @@ pwre_config_check_lib() ...@@ -157,42 +159,42 @@ pwre_config_check_lib()
lib=${file##/*/lib} lib=${file##/*/lib}
if test $4 == "gtk"; then if test $4 == "gtk"; then
conf_libgtk=$conf_libgtk" -l${lib%.*}" conf_libgtk=$conf_libgtk" -l${lib%.*}"
elif test $4 == "motif"; then elif test $4 == "motif"; then
conf_libmotif=$conf_libmotif" -l${lib%.*}" conf_libmotif=$conf_libmotif" -l${lib%.*}"
elif test $4 == "qt"; then elif test $4 == "qt"; then
conf_libqt=$conf_libqt" -l${lib%.*}" conf_libqt=$conf_libqt" -l${lib%.*}"
elif test $4 == "wb"; then elif test $4 == "wb"; then
conf_libwb=$conf_libwb" -l${lib%.*}" conf_libwb=$conf_libwb" -l${lib%.*}"
elif test $4 == "mq"; then elif test $4 == "mq"; then
conf_libmq=$conf_libmq" -l${lib%.*}" conf_libmq=$conf_libmq" -l${lib%.*}"
elif test $4 == "wmq"; then elif test $4 == "wmq"; then
conf_libwmq=$conf_libwmq" -l${lib%.*}" conf_libwmq=$conf_libwmq" -l${lib%.*}"
elif test $4 == "pnak"; then elif test $4 == "pnak"; then
conf_libpnak=$conf_libpnak" -l${lib%.*}" conf_libpnak=$conf_libpnak" -l${lib%.*}"
elif test $4 == "libusb"; then elif test $4 == "libusb"; then
conf_lib=$conf_lib" -lusb-1.0" conf_lib=$conf_lib" -lusb-1.0"
elif test $4 == "libpiface"; then elif test $4 == "libpiface"; then
conf_lib=$conf_lib" -lpiface-1.0" conf_lib=$conf_lib" -lpiface-1.0"
elif test $4 == "powerlink"; then elif test $4 == "powerlink"; then
conf_libpowerlink=$conf_libpowerlink" -L$lib_path -l${lib%.*}" conf_libpowerlink=$conf_libpowerlink" -L$lib_path -l${lib%.*}"
elif test $4 == "powerlinkcn"; then elif test $4 == "powerlinkcn"; then
conf_libpowerlinkcn=$conf_libpowerlinkcn" -L$lib_path -l${lib%.*}" conf_libpowerlinkcn=$conf_libpowerlinkcn" -L$lib_path -l${lib%.*}"
elif test $4 == "libpcap"; then elif test $4 == "libpcap"; then
conf_libpowerlink=$conf_libpowerlink" -l${lib%.*}" conf_libpowerlink=$conf_libpowerlink" -l${lib%.*}"
conf_libpowerlinkcn=$conf_libpowerlinkcn" -l${lib%.*}" conf_libpowerlinkcn=$conf_libpowerlinkcn" -l${lib%.*}"
else else
conf_lib=$conf_lib" -l${lib%%.*}" conf_lib=$conf_lib" -l${lib%%.*}"
fi fi
elif test $3 == "gtk"; then elif test $3 == "gtk"; then
conf_libgtk=$conf_libgtk" \\\`pkg-config --libs gtk+-2.0\\\`" conf_libgtk=$conf_libgtk" \\\`pkg-config --libs gtk+-2.0\\\`"
conf_incdirgtk=$conf_incdirgtk" \\\`pkg-config --cflags gtk+-2.0\\\`" conf_incdirgtk=$conf_incdirgtk" \\\`pkg-config --cflags gtk+-2.0\\\`"
elif test $3 == "qt"; then elif test $3 == "qt"; then
conf_libqt=$conf_libqt" \\\`pkg-config --libs QtCore QtGui QtNetwork phonon\\\`" conf_libqt=$conf_libqt" \\\`pkg-config --libs QtCore QtGui QtNetwork phonon\\\`"
conf_incdirqt=$conf_incdirqt" \\\`pkg-config --cflags QtCore QtGui QtNetwork phonon\\\`" conf_incdirqt=$conf_incdirqt" \\\`pkg-config --cflags QtCore QtGui QtNetwork phonon\\\`"
elif test $3 == "gst"; then elif test $3 == "gst"; then
conf_libgst=$conf_libgst" \\\`pkg-config --libs gstreamer-video-1.0 gstreamer-1.0\\\`" conf_libgst=$conf_libgst" \\\`pkg-config --libs gstreamer-video-1.0 gstreamer-1.0\\\`"
conf_incdirgst=$conf_incdirgst" \\\`pkg-config --cflags gstreamer-video-1.0 gstreamer-1.0\\\`" conf_incdirgst=$conf_incdirgst" \\\`pkg-config --cflags gstreamer-video-1.0 gstreamer-1.0\\\`"
elif test $3 == "motif"; then elif test $3 == "motif"; then
conf_libmotif=$conf_libmotif" -lImlib -lMrm -lXm -lXpm -lXt -lX11 -lXext -lXp -lSM -lICE" conf_libmotif=$conf_libmotif" -lImlib -lMrm -lXm -lXpm -lXt -lX11 -lXext -lXp -lSM -lICE"
else else
echo "Unknown type" echo "Unknown type"
...@@ -214,7 +216,7 @@ pwre_create_blddir() ...@@ -214,7 +216,7 @@ pwre_create_blddir()
if test ! -e $pwre_croot/src/tools/bld/src/$pwre_os; then if test ! -e $pwre_croot/src/tools/bld/src/$pwre_os; then
cp -r $pwre_croot/src/tools/bld/src/os_templ $pwre_croot/src/tools/bld/src/$pwre_os cp -r $pwre_croot/src/tools/bld/src/os_templ $pwre_croot/src/tools/bld/src/$pwre_os
mv $pwre_croot/src/tools/bld/src/$pwre_os/hw_templ $pwre_croot/src/tools/bld/src/$pwre_os/$pwre_hw mv $pwre_croot/src/tools/bld/src/$pwre_os/hw_templ $pwre_croot/src/tools/bld/src/$pwre_os/$pwre_hw
elif test ! -e $pwre_croot/src/tools/bld/src/$pwre_os/$pwre_hw; then elif test ! -e $pwre_croot/src/tools/bld/src/$pwre_os/$pwre_hw; then
cp -r $pwre_croot/src/tools/bld/src/os_templ/hw_templ $pwre_croot/src/tools/bld/src/$pwre_os/$pwre_hw cp -r $pwre_croot/src/tools/bld/src/os_templ/hw_templ $pwre_croot/src/tools/bld/src/$pwre_os/$pwre_hw
fi fi
} }
...@@ -244,7 +246,7 @@ pwre_create_makedir() ...@@ -244,7 +246,7 @@ pwre_create_makedir()
done done
if test -e $newdir/.$pwre_hw; then if test -e $newdir/.$pwre_hw; then
cp -p $dir/hw_templ/* $newdir/.$pwre_hw/ cp -p $dir/hw_templ/* $newdir/.$pwre_hw/
elif test -e $dir/hw_templ; then elif test -e $dir/hw_templ; then
# Create hw dir # Create hw dir
echo "Creating $newdir/$pwre_hw" echo "Creating $newdir/$pwre_hw"
cp -pr $dir/hw_templ $newdir/.$pwre_hw cp -pr $dir/hw_templ $newdir/.$pwre_hw
...@@ -255,7 +257,7 @@ pwre_create_makedir() ...@@ -255,7 +257,7 @@ pwre_create_makedir()
if test ! -e $newdir/$pwre_hw; then if test ! -e $newdir/$pwre_hw; then
if test -e $newdir/.$pwre_hw; then if test -e $newdir/.$pwre_hw; then
cp -p $dir/hw_templ/* $newdir/.$pwre_hw/ cp -p $dir/hw_templ/* $newdir/.$pwre_hw/
elif test -e $dir/hw_templ; then elif test -e $dir/hw_templ; then
# Create hw dir # Create hw dir
echo "Creating $newdir/.$pwre_hw" echo "Creating $newdir/.$pwre_hw"
cp -pr $dir/hw_templ $newdir/.$pwre_hw cp -pr $dir/hw_templ $newdir/.$pwre_hw
...@@ -336,24 +338,32 @@ fi ...@@ -336,24 +338,32 @@ fi
declare -i buildversion_set=0 declare -i buildversion_set=0
declare -i lockdbs_set=0 declare -i lockdbs_set=0
declare -i lockdbs=0 declare -i lockdbs=0
declare -i parallel_set=0
declare -i parallel=0
if [ "$1" = "--help" ]; then if [ "$1" = "--help" ]; then
pwre_help pwre_help
exit exit
elif [ "$1" = "--version" ] && [ "$2" != "" ] && [ "$3" != "" ]; then elif [ "$1" = "--version" ] && [ "$2" != "" ] && [ "$3" != "" ]; then
buildversion=$2" "$3 buildversion=$2" "$3
buildversion_set=1 buildversion_set=1
elif [ "$1" = "--reset-version" ]; then elif [ "$1" = "--reset-version" ]; then
buildversion="" buildversion=""
buildversion_set=1 buildversion_set=1
elif [ "$1" = "--lock-dbs" ]; then elif [ "$1" = "--lock-dbs" ]; then
lockdbs=1 lockdbs=1
lockdbs_set=1 lockdbs_set=1
elif [ "$1" = "--unlock-dbs" ]; then elif [ "$1" = "--unlock-dbs" ]; then
lockdbs=0 lockdbs=0
lockdbs_set=1 lockdbs_set=1
elif [ "$1" = "--ebuild" ]; then elif [ "$1" = "--parallel" ]; then
parallel=1
parallel_set=1
elif [ "$1" = "--not-parallel" ]; then
parallel=0
parallel_set=1
elif [ "$1" = "--ebuild" ]; then
ebuild=1 ebuild=1
elif [ "$1" != "" ]; then elif [ "$1" != "" ]; then
echo "Unknown option \"$1\"" echo "Unknown option \"$1\""
exit exit
fi fi
...@@ -375,6 +385,14 @@ if [ $lockdbs_set -eq 0 ]; then ...@@ -375,6 +385,14 @@ if [ $lockdbs_set -eq 0 ]; then
lockdbs=$ver lockdbs=$ver
fi fi
fi fi
if [ $parallel_set -eq 0 ]; then
# Catch current value
if [ -e $cfile ]; then
ver=`eval cat $cfile | grep "\bexport PWRE_CONF_PARALLEL"`
ver=${ver#*=}
parallel=$ver
fi
fi
pwre_create_blddir pwre_create_blddir
...@@ -388,6 +406,7 @@ else ...@@ -388,6 +406,7 @@ else
echo "export PWRE_CONF_BUILDVERSION=\"0\"" >> $cfile echo "export PWRE_CONF_BUILDVERSION=\"0\"" >> $cfile
fi fi
echo "export PWRE_CONF_LOCKDBS=$lockdbs" >> $cfile echo "export PWRE_CONF_LOCKDBS=$lockdbs" >> $cfile
echo "export PWRE_CONF_PARALLEL=$parallel" >> $cfile
if [ $pwre_hw == "hw_arm" ] && [ $ebuild -eq 1 ]; then if [ $pwre_hw == "hw_arm" ] && [ $ebuild -eq 1 ]; then
echo "Arm ebuild" echo "Arm ebuild"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment