Prechádzať zdrojové kódy

Makefile: simplify handling of build target names

Instead of stripping the "_config" part from the make target names in
each call of the "mkconfig" script let this script strip the string.

This prepares the ground for forther simplification of the top level
Makefile.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Wolfgang Denk 15 rokov pred
rodič
commit
ed7a196cd5
2 zmenil súbory, kde vykonal 188 pridanie a 202 odobranie
  1. 185 199
      Makefile
  2. 3 3
      mkconfig

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 185 - 199
Makefile


+ 3 - 3
mkconfig

@@ -16,13 +16,13 @@ while [ $# -gt 0 ] ; do
 	case "$1" in
 	case "$1" in
 	--) shift ; break ;;
 	--) shift ; break ;;
 	-a) shift ; APPEND=yes ;;
 	-a) shift ; APPEND=yes ;;
-	-n) shift ; BOARD_NAME="${1%%_config}" ; shift ;;
+	-n) shift ; BOARD_NAME="${1%_config}" ; shift ;;
 	-t) shift ; TARGETS="`echo $1 | sed 's:_: :g'` ${TARGETS}" ; shift ;;
 	-t) shift ; TARGETS="`echo $1 | sed 's:_: :g'` ${TARGETS}" ; shift ;;
 	*)  break ;;
 	*)  break ;;
 	esac
 	esac
 done
 done
 
 
-[ "${BOARD_NAME}" ] || BOARD_NAME="$1"
+[ "${BOARD_NAME}" ] || BOARD_NAME="${1%_config}"
 
 
 [ $# -lt 4 ] && exit 1
 [ $# -lt 4 ] && exit 1
 [ $# -gt 6 ] && exit 1
 [ $# -gt 6 ] && exit 1
@@ -102,7 +102,7 @@ done
 cat << EOF >> config.h
 cat << EOF >> config.h
 #define CONFIG_BOARDDIR board/$BOARDDIR
 #define CONFIG_BOARDDIR board/$BOARDDIR
 #include <config_defaults.h>
 #include <config_defaults.h>
-#include <configs/$1.h>
+#include <configs/${BOARDNAME}.h>
 #include <asm/config.h>
 #include <asm/config.h>
 EOF
 EOF
 
 

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov