FreeCalypso > hg > fc-magnetite
comparison scripts/mk-component.sh @ 105:5e2b0806b098
scripts/mk-component.sh make_version(): allow filename to be different
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Wed, 05 Oct 2016 18:46:25 +0000 |
| parents | 838717193e09 |
| children | feba9ffc2627 |
comparison
equal
deleted
inserted
replaced
| 104:27a4235405c6 | 105:5e2b0806b098 |
|---|---|
| 36 echo >> $BUILD_DIR/$LIBNAME/Makefile | 36 echo >> $BUILD_DIR/$LIBNAME/Makefile |
| 37 | 37 |
| 38 # shell functions to be used in the recipes | 38 # shell functions to be used in the recipes |
| 39 | 39 |
| 40 make_version() { | 40 make_version() { |
| 41 if [ $# != 1 ] | 41 case $# in |
| 42 then | 42 1) |
| 43 echo "Error: make_version takes 1 argument" 1>&2 | 43 echo "$1_version.c:" >> $BUILD_DIR/$LIBNAME/Makefile |
| 44 echo " ../../scripts/make-version.sh $1 > $1_version.c" \ | |
| 45 >> $BUILD_DIR/$LIBNAME/Makefile | |
| 46 ;; | |
| 47 2) | |
| 48 echo "$2_version.c:" >> $BUILD_DIR/$LIBNAME/Makefile | |
| 49 echo " ../../scripts/make-version.sh $1 > $2_version.c" \ | |
| 50 >> $BUILD_DIR/$LIBNAME/Makefile | |
| 51 ;; | |
| 52 *) | |
| 53 echo "Error: make_version takes 1 or 2 arguments" 1>&2 | |
| 44 exit 1 | 54 exit 1 |
| 45 fi | 55 ;; |
| 46 echo "$1_version.c:" >> $BUILD_DIR/$LIBNAME/Makefile | 56 esac |
| 47 echo " ../../scripts/make-version.sh $1 > $1_version.c" \ | |
| 48 >> $BUILD_DIR/$LIBNAME/Makefile | |
| 49 echo >> $BUILD_DIR/$LIBNAME/Makefile | 57 echo >> $BUILD_DIR/$LIBNAME/Makefile |
| 50 } | 58 } |
| 51 | 59 |
| 52 asm_file() { | 60 asm_file() { |
| 53 if [ $# != 1 ] | 61 if [ $# != 1 ] |
