Changeset 27 in flair-dev for trunk/scripts


Ignore:
Timestamp:
Jul 18, 2016, 4:16:42 PM (8 years ago)
Author:
Sanahuja Guillaume
Message:

m

Location:
trunk/scripts
Files:
1 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/scripts/compile_info.sh

    r25 r27  
    1 #usage svn_revision.sh dir file
     1#usage svn_revision.sh gcc dir file
     2#gcc: gcc path
    23#dir: directory to get svn revision
    34#file: output file to put revision
    45
    5 SVN_REV=$(svnversion $1)
    6 TXT="#define SVN_REV \"svnversion of $1 is ${SVN_REV}\\n\""
     6USER=$(whoami)@$(hostname)
     7DATE=$(date)
     8GCC_REV=$($1 -dumpversion)
     9SVN_PATH=$(readlink -f $2)
     10SVN_REV=$(svnversion $(readlink -f $2))
    711
     12mkdir -p $(dirname $3)
    813
    9 if [ -e $2 ] && [ "$TXT" = "$(cat $2)" ] ; then
    10         /bin/echo "$2 is up to date"
    11 else
    12         /bin/echo $TXT > $2
    13 fi
     14cat > $3 <<EOF
     15//file generated automatically by compile_info.sh script
     16//do not edit it manually
     17
     18#include <string>
     19
     20#define USER "${USER}"
     21#define DATE "${DATE}"
     22#define GCC_REV "${GCC_REV}"
     23#define GCC_PATH "$1"
     24#define SVN_PATH "${SVN_PATH}"
     25#define SVN_REV "${SVN_REV}"
     26
     27inline void compile_info(std::string name) {
     28        fprintf(stderr,"Using %s library:\n",name.c_str());
     29        fprintf(stderr,"  -built by " USER " on " DATE "\n");
     30        fprintf(stderr,"  -with GCC " GCC_REV " from " GCC_PATH "\n");
     31        fprintf(stderr,"  -svnversion of " SVN_PATH " is " SVN_REV "\n\n");
     32}
     33EOF
  • trunk/scripts/flair_compile_all.sh

    r26 r27  
    108108        done
    109109
     110        for projects in CustomReferenceAngles CustomTorques; do
     111                configure $FLAIR_ROOT/flair-src/demos/Skeletons $projects
     112                compile $FLAIR_ROOT/flair-src/demos/Skeletons $projects
     113                cross_compile $FLAIR_ROOT/flair-src/demos/Skeletons $projects
     114        done
     115
    110116        if [ -d $FLAIR_ROOT/flair-hds ]; then
    111117                for projects in OpticalFlow; do
     
    123129        done
    124130
    125         for projects in CustomReferenceAngles CustomTorques; do
    126                 configure $FLAIR_ROOT/uav_ex/skeletons_framework $projects
    127                 compile $FLAIR_ROOT/uav_ex/skeletons_framework $projects
    128                 cross_compile $FLAIR_ROOT/uav_ex/skeletons_framework $projects
    129         done
     131       
    130132}
    131133
Note: See TracChangeset for help on using the changeset viewer.