[OpenWalnut-Dev] [OW-Modules] r41: [ADD] a scripts that can compile all toolboxes in this repository

Sebastian Eichelbaum eichelbaum at informatik.uni-leipzig.de
Tue Jul 24 12:23:02 CEST 2012


Hi

3 Things:

* Check portability.
* make install might be critical there. As the user does not get asked where to install, usr/local is used as default. This of course fails for normal users.
* Configuring via CMake, Building, and installing are 3 things. There are still missing things (clean, purge (rm -rf build + new cmake)).

So actually the script is not optimal. Please provide a script which allows "commands":

makeAll COMMAND <COMMAND_PARAMETRS>

Where COMMAND is one of configure, build, install, clean, purge. The command_parameters look this way:

for command = configure: <OPENWALNUT_LIBDIR> <OPENWALNUT_INCLUDE_DIR>" [INSTALL_PREFIX]
for command = build: <NUMBER_OF_JOBS>
for command = install: no parameters or optionally the install prefix!?
for command = clean: no paremeters
for command = purge: no parameters

I know this complicates the script tremendously but it makes the script useful in many situations:

clean:

Assume you debug openwalnut. All the annoying modules get loaded as potential source of error and you want to stop this. You would need to tell OW to not load the module repo path OR you remove all modules with the clean command

purge:

We changed something in the OpenWalnut.cmake scripts and renamed some variables. You cannot reuse the old CMakeCache and so on. Just purge your toolboxes and rebuild

install:

In most cases you do not want to install modules because OW searches the modules and you tell OW where to search. IFF you really want to install (you build a binary package or similar) you can use the install target for all toolboxes with a specified location parameter

configure and build:

Ok this is obvious. But you can specify a number of jobs for parallel build ;-)

So please, if you find the time improve the script.

Thank you,
Sebastian

On Tue, 24 Jul 2012, Alexander Wiebel wrote:

> *Branch default*
> [ADD] a scripts that can compile all toolboxes in this repository
> 
> changeset 41:8836895ca73e in /srv/hg/ow-modules (Tue Jul 24 11:53:53 2012 +0200):
> 
> diffstat:
> 
>  makeAllToolboxes |  26 ++++++++++++++++++++++++++
>  1 files changed, 26 insertions(+), 0 deletions(-)
> 
> diffs (31 lines):
> 
> diff -r ea849b6320d8 -r 8836895ca73e makeAllToolboxes
> --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> +++ b/makeAllToolboxes	Tue Jul 24 11:53:53 2012 +0200
> @@ -0,0 +1,26 @@
> +#!/bin/bash
> +
> +PARAM1=$1
> +PARAM2=$2
> +if [ "$PARAM1" -a "$PARAM2" ]; # Test for empty strings
> +then
> +    echo OPENWALNUT_LIBDIR $PARAM1
> +    echo OPENWALNUT_INCLUDE_DIR $PARAM2
> +    echo
> +else
> +    echo "Usage: makeAllToolboxes <OPENWALNUT_LIBDIR> <OPENWALNUT_INCLUDE_DIR>"
> +    echo "Not enough parameters given, exiting."
> +    exit;
> +fi
> +  
> +for i in $(ls */ -d);
> +do
> +    echo $i;
> +    cd $i
> +    mkdir -p build
> +    cd build
> +    cmake -DOPENWALNUT_LIBDIR=$PARAM1 -DOPENWALNUT_INCLUDE_DIR=$PARAM2 ../src
> +    make
> +    make install
> +    cd ../..
> +done
> \ No newline at end of file
> _______________________________________________
> All-openwalnut-commits mailing list
> All-openwalnut-commits at lists.informatik.uni-leipzig.de
> http://lists.informatik.uni-leipzig.de/mailman/listinfo/all-openwalnut-commits
> 

-- 
Dipl.-Inf. Sebastian Eichelbaum
Universität Leipzig
Institut für Informatik
Abteilung Bild- und Signalverarbeitung
PF 100920
D-04009 Leipzig


More information about the OpenWalnut-Dev mailing list