Changeset 45 in pacpussensors for trunk/build/build_linux.sh


Ignore:
Timestamp:
04/17/14 17:52:29 (10 years ago)
Author:
DHERBOMEZ Gérald
Message:

Some modifications of build environment for Linux

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/build/build_linux.sh

    r5 r45  
    1 #!/bin/sh
     1#!/bin/bash
    22
    33set -e
    44
    5 BUILD_DIR=./build
    6 if [ -z $1 ]; then J="1"; else J="$1"; fi
     5if [ -z $PACPUS_ROOT ]; then
     6        echo PACPUS_ROOT environment variable does not exist, please set it the folder in which you have installed pacpusframework.
     7else
    78
    8 if [ "$TARGET_PREFIX" == "arm-poky-linux-gnueabi-" ]; then
    9     echo The environment is configured for poky_arm
    10     exit 1
     9        BUILD_DIR=./build${PACPUS_ROOT////_}
     10        echo Your files will be built in: $BUILD_DIR
     11
     12        if [ -z $1 ]; then J="1"; else J="$1";
     13        fi
     14
     15        if [ "$TARGET_PREFIX" == "arm-poky-linux-gnueabi-" ]; then
     16                echo The environment is configured for poky_arm
     17                exit 1
     18        fi
     19
     20        if [ -d "$BUILD_DIR" ]; then
     21                rm -rf $BUILD_DIR
     22        fi
     23
     24        mkdir $BUILD_DIR
     25        cd $BUILD_DIR
     26
     27        cmake ../..
     28
     29        make -j$J
     30        sudo make install
     31
    1132fi
    1233
    13 if [ -d "$BUILD_DIR" ]; then
    14     rm -rf $BUILD_DIR
    15 fi
    16 
    17 mkdir $BUILD_DIR
    18 cd $BUILD_DIR
    19 
    20 cmake ../..
    21 
    22 make -j$J
    23 sudo make install
    24 
    25 
Note: See TracChangeset for help on using the changeset viewer.