##// END OF EJS Templates
added pdf template
added pdf template

File last commit:

r7:16404fe7ec6c default
r8:8cd05144ebee default
Show More
functions
69 lines | 2.6 KiB | text/plain | TextLexer
Libuc make templates extracted from main script, to make it more modular
r7 #!/bin/bash
#/*------------------------------------------------------------------------------
#-- This file is a part of the libuc, microcontroler library
#-- Copyright (C) 2011, Alexis Jeandet
#--
#-- This program is free software; you can redistribute it and/or modify
#-- it under the terms of the GNU General Public License as published by
#-- the Free Software Foundation; either version 3 of the License, or
#-- (at your option) any later version.
#--
#-- This program is distributed in the hope that it will be useful,
#-- but WITHOUT ANY WARRANTY; without even the implied warranty of
#-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#-- GNU General Public License for more details.
#--
#-- You should have received a copy of the GNU General Public License
#-- along with this program; if not, write to the Free Software
#-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#-------------------------------------------------------------------------------
#-- Author : Alexis Jeandet
#-- Mail : alexis.jeandet@gmail.com
#-------------------------------------------------------------------------------*/
function getFilesList {
sed ':a;N;$!ba;s/\\\n/ /g' $1 | sed ':a;N;$!ba;s/\\ \n/ /g' | grep -i $2 | sed 's/\t//g'
}
function Template {
TEMPLATE=`more $1 | grep -i "TEMPLATE " | sed s/TEMPLATE// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'`
}
function Arch {
ARCH=`more $1 | grep -i "ARCH " | sed s/ARCH// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'`
}
function Target {
TARGET=`more $1 | grep -i "TARGET " | sed s/TARGET// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'`
}
function Libs_Inc {
INCLUDEStmp=`more $1 | grep -i "LIBS " | sed s/LIBS// |sed s/+//|sed s/=//| sed 's/^[ \t]*//;s/[ \t]*$//'`
for FILES in $INCLUDEStmp
do
INCLUDES+='$('"LIBUC_INC_DIR_$FILES) "
done
}
function Libs_Link {
LIBRARIEStmp=`more $1 | grep -i "LIBS " | sed s/LIBS// |sed s/+//|sed s/=//| sed 's/^[ \t]*//;s/[ \t]*$//'`
for FILES in $LIBRARIEStmp
do
LIBRARIES+='$('"LIBUC_LIBS_DIR_$FILES) "'$('"LIBUC_LIBS_$FILES) "
done
}
function HeadersInstallPath {
HEADERSINSTALLPATH=`more $1 | grep -i "HEADERSINSTALLPATH" | sed s/HEADERSINSTALLPATH// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'`
}
function TargetInstallPath {
TARGETINSTALLPATH=`more $1 | grep -i "TARGETINSTALLPATH" | sed s/TARGETINSTALLPATH// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'`
}
function getBSP {
if(more $1 | grep -i "BSP ="); then
BSP=`more $1 | grep -i "BSP" | sed s/BSP// | sed s/=// | sed 's/^[ \t]*//;s/[ \t]*$//'`
fi
}