[U-Boot] [PATCH 2/2] Makefile: Accept target names in all lower case to ease matching

--- Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile index 1a17be9..5a98745 100644 --- a/Makefile +++ b/Makefile @@ -752,6 +752,7 @@ unconfig: sinclude $(obj).boards.depend $(obj).boards.depend: boards.cfg @awk '(NF && $$1 !~ /^#/) { print $$1 ": " $$1 "_config; $$(MAKE)" }' $< > $@ + @awk '(NF && $$1 !~ /^#/ && tolower($$1) != $$1) { print tolower($$1) ": " $$1 "_config; $$(MAKE)" }' $< > $@
# # Functions to generate common board directory names

Dear Henrik Nordström,
In message 1353842544.17518.11.camel@home.hno.se you wrote:
Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile index 1a17be9..5a98745 100644 --- a/Makefile +++ b/Makefile @@ -752,6 +752,7 @@ unconfig: sinclude $(obj).boards.depend $(obj).boards.depend: boards.cfg @awk '(NF && $$1 !~ /^#/) { print $$1 ": " $$1 "_config; $$(MAKE)" }' $< > $@
- @awk '(NF && $$1 !~ /^#/ && tolower($$1) != $$1) { print tolower($$1) ": " $$1 "_config; $$(MAKE)" }' $< > $@
NAK. This is not DOS. Names are case sensitive.
Best regards,
Wolfgang Denk

sön 2012-11-25 klockan 18:45 +0100 skrev Wolfgang Denk:
Dear Henrik Nordström,
In message 1353842544.17518.11.camel@home.hno.se you wrote:
Makefile | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile index 1a17be9..5a98745 100644 --- a/Makefile +++ b/Makefile @@ -752,6 +752,7 @@ unconfig: sinclude $(obj).boards.depend $(obj).boards.depend: boards.cfg @awk '(NF && $$1 !~ /^#/) { print $$1 ": " $$1 "_config; $$(MAKE)" }' $< > $@
- @awk '(NF && $$1 !~ /^#/ && tolower($$1) != $$1) { print tolower($$1) ": " $$1 "_config; $$(MAKE)" }' $< > $@
NAK. This is not DOS. Names are case sensitive.
Ok, then I'll swing the patch in the other direction and make target names actually case sensitive. Because today they are a bit confused partially case-insensitive.
Note that it's not about board config file names or directory names, only about the first column in boards.cfg.
Regards Henrik
--- From: Henrik Nordstrom henrik@henriknordstrom.net Date: Sun, 25 Nov 2012 19:00:12 +0100 Subject: [PATCH] mkconfig: Make board name matching case-sensitive
As per mail discussion board names are supposed to be case-sensitive --- mkconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mkconfig b/mkconfig index 7c9aa74..324703f 100755 --- a/mkconfig +++ b/mkconfig @@ -21,7 +21,7 @@ options=""
if [ ( $# -eq 2 ) -a ( "$1" = "-A" ) ] ; then # Automatic mode - line=`egrep -i "^[[:space:]]*${2}[[:space:]]" boards.cfg` || { + line=`egrep "^[[:space:]]*${2}[[:space:]]" boards.cfg` || { echo "make: *** No rule to make target `$2_config'. Stop." >&2 exit 1 }

Dear Henrik Nordström,
In message 1353866899.28559.57.camel@home.hno.se you wrote:
@awk '(NF && $$1 !~ /^#/) { print $$1 ": " $$1 "_config; $$(MAKE)" }' $< > $@
- @awk '(NF && $$1 !~ /^#/ && tolower($$1) != $$1) { print tolower($$1) ": " $$1 "_config; $$(MAKE)" }' $< > $@
NAK. This is not DOS. Names are case sensitive.
Ok, then I'll swing the patch in the other direction and make target names actually case sensitive. Because today they are a bit confused partially case-insensitive.
Where exactly?
Note that it's not about board config file names or directory names, only about the first column in boards.cfg.
Well, these are make targets, so they are definitely case sensitive.
if [ ( $# -eq 2 ) -a ( "$1" = "-A" ) ] ; then # Automatic mode
- line=`egrep -i "^[[:space:]]*${2}[[:space:]]" boards.cfg` || {
- line=`egrep "^[[:space:]]*${2}[[:space:]]" boards.cfg` || {
Did you test what gets broken by this patch?
Best regards,
Wolfgang Denk

sön 2012-11-25 klockan 21:04 +0100 skrev Wolfgang Denk:
Well, these are make targets, so they are definitely case sensitive.
if [ ( $# -eq 2 ) -a ( "$1" = "-A" ) ] ; then # Automatic mode
- line=`egrep -i "^[[:space:]]*${2}[[:space:]]" boards.cfg` || {
- line=`egrep "^[[:space:]]*${2}[[:space:]]" boards.cfg` || {
Did you test what gets broken by this patch?
All normal "make targetname" is unaffected by the change as they are case sensitive.
What gets broken by the change os someone calling
make wronglycasedtargetname_config
Or direct invocation of
./mkconfig -A wronglycasedtargetname
Regards Henrik
participants (2)
-
Henrik Nordström
-
Wolfgang Denk