Submitter | Nickolas Lloyd |
---|---|
Date | 2011-04-06 16:37:37 |
Message ID | <BANLkTinmt+1a=VoddL7UZFG1Max1GQJzCg@mail.gmail.com> |
Download | mbox | patch |
Permalink | /patch/2855/ |
State | New |
Headers | show |
Comments
Hi Nickolas, On Wed, Apr 6, 2011 at 10:37 AM, Nickolas Lloyd <ntlloyd@uncg.edu> wrote: > Sorry about the mangling, I've attached the patch this time. > > + @echo "Built coreboot for $(CONFIG_MAINBOARD_VENDOR) $(CONFIG_MAINBOARD_PART_NUMBER)" I think that you want the variables outside the "". Marc
On Thu, 7 Apr 2011, Marc Jones wrote: > Hi Nickolas, > > > > On Wed, Apr 6, 2011 at 10:37 AM, Nickolas Lloyd <ntlloyd@uncg.edu> wrote: >> Sorry about the mangling, I've attached the patch this time. >> > >> + @echo "Built coreboot for $(CONFIG_MAINBOARD_VENDOR) $(CONFIG_MAINBOARD_PART_NUMBER)" > > I think that you want the variables outside the "". > At least here the echo command ignores the quotes. Try this: export ARCH=i686 then echo my arch is $ARCH echo "my arch is $ARCH" echo "my arch" is $ARCH all yeald the same result: my arch is i686 Russ
In bash at least using double-quotes results in the evaluation of symbols, whereas single-quotes doesn't. I suspect it's the same for make. I can change it if you like though. Nick On Thu, Apr 7, 2011 at 6:56 PM, Russell Whitaker <russ@ashlandhome.net> wrote: > > > On Thu, 7 Apr 2011, Marc Jones wrote: > >> Hi Nickolas, >> >> >> >> On Wed, Apr 6, 2011 at 10:37 AM, Nickolas Lloyd <ntlloyd@uncg.edu> wrote: >>> >>> Sorry about the mangling, I've attached the patch this time. >>> >> >>> + @echo "Built coreboot for $(CONFIG_MAINBOARD_VENDOR) >>> $(CONFIG_MAINBOARD_PART_NUMBER)" >> >> I think that you want the variables outside the "". >> > At least here the echo command ignores the quotes. > Try this: > export ARCH=i686 > then > echo my arch is $ARCH > echo "my arch is $ARCH" > echo "my arch" is $ARCH > all yeald the same result: my arch is i686 > > Russ >
Nickolas Lloyd wrote: > In bash at least using double-quotes results in the evaluation of > symbols, whereas single-quotes doesn't. I suspect it's the same > for make. make expands $() regardless of whether it is inside quotes or not. make doesn't do much parsing, after expansion the command is passed to sh: $ cat Makefile X:=bar .PHONY: x x: @echo "foo $(X) baz" $ strace -fF make 2>&1 | grep echo read(3, "X:=bar\n\n.PHONY: x\nx:\n\t@echo \"foo "..., 4096) = 43 [pid 29660] execve("/bin/sh", ["/bin/sh", "-c", "echo \"foo bar baz\""], [/* 51 vars */]) = 0 > I can change it if you like though. Better keep it inside the quotes, so that weird names will not mess up the shell, if we'll ever have any names like that. Acked-by: Peter Stuge <peter@stuge.se> //Peter
Patch
diff --git a/Makefile b/Makefile index 06847b6..ddc12a6 100644 --- a/Makefile +++ b/Makefile @@ -145,6 +145,7 @@ real-all: else real-all: real-target endif + @echo "Built coreboot for $(CONFIG_MAINBOARD_VENDOR) $(CONFIG_MAINBOARD_PART_NUMBER)" # must come rather early .SECONDEXPANSION: diff --git a/Makefile.inc b/Makefile.inc index 3f553c6..74b4455 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -31,7 +31,9 @@ export MAINBOARDDIR ####################################################################### # root rule to resolve if in build mode (ie. configuration exists) real-target: $(obj)/config.h coreboot -coreboot: $(obj)/coreboot.rom +coreboot: building-msg $(obj)/coreboot.rom +building-msg: + @echo "Building coreboot for $(CONFIG_MAINBOARD_VENDOR) $(CONFIG_MAINBOARD_PART_NUMBER)" ####################################################################### # our phony targets
Sorry about the mangling, I've attached the patch this time. Nickolas From 404e7bd11e3dadf912b45057000e053db5ed7e90 Mon Sep 17 00:00:00 2001 From: Nickolas Lloyd <ntlloyd@uncg.edu> Date: Tue, 5 Apr 2011 19:18:07 -0400 Subject: [PATCH] Print what mainboard coreboot is being built for during build Print a message before and after build saying what mainboard coreboot is being built for. Only printed after build if build was successful --- Makefile | 1 + Makefile.inc | 4 +++- 2 files changed, 4 insertions(+), 1 deletions(-)