#!/bin/sh # /***************************************************************/ # /* */ # /* alzam generate mode */ # /* */ # /* create all Makefile and Makefile.in for the selected module */ # /***************************************************************/ # # // allow alzam to use this mode ALZAM_MODES="$ALZAM_MODES generate" function generateSubDir () { cd $subdir listoffiles="" listofcpp="" listoffiles="" listofcpp="" listofc="" listofcpp=$(find *.cpp) listofc=$(find *.c) listoffiles=$(for file in $listofcpp; do printf "%s " $(basename $file ".cpp"); done; for file in $listofc; do printf "%s " $(basename $file ".c"); done) listofsubdir=""; listofsubdir=$(for dir in *; do if [ -d "$dir" -a ! -L "$dir" ]; then printf "%s " $dir; fi; done); if [ "$listoffiles" -o "$listofsubdir" ]; then echo "TODO = $listoffiles" >Makefile.in; echo "SUBS = $listofsubdir" >>Makefile.in; cp $alzamdir/alzamconf/Makefile.model ./Makefile; for dir in $listofsubdir; do subdir=$dir; generateSubDir; done; fi; cd .. } # // mode implentation function generate () { RELEASE=no TARGET_PATH="$TARGET_PATH/debug" TARGET_SCOL="$TARGET_SCOL_PATH/$TARGET" TARGET="$TARGET_PATH/$TARGET" alzamdir=$PWD subdir=$SRC_PATH generateSubDir; exit; }