Skip to contentSkip to conversation

env: Fix operation of 'make environ'

PATCH New Simon Glass 4 participants 5 messages Aug 27, 2017 – Sep 5, 2017 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 env: Fix operation of 'make environ'

This was broken by the recent environment refactoring. Specifically:

$  make environ
scripts/Makefile.build:59: tools/environ/Makefile: No such file or directory
make[1]: *** No rule to make target 'tools/environ/Makefile'.  Stop.
make: *** [Makefile:1469: environ] Error 2

Fix this by updating the Makefile and adjusting the #include filesnames in two C files.

Fixes ec74f5f (Makefile: Rename 'env' target to 'environ')

---

 Makefile              | 2 +-
 tools/env/env_attr.c  | 2 +-
 tools/env/env_flags.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Makefile +1 -1
index a0f3bfd2a52..dd9d5678118 100644
@@ -1466,7 +1466,7 @@ checkarmreloc: u-boot
 	fi
 
 environ: scripts_basic
-	$(Q)$(MAKE) $(build)=tools/$@
+	$(Q)$(MAKE) $(build)=tools/env
 
 tools-only: scripts_basic $(version_h) $(timestamp_h)
 	$(Q)$(MAKE) $(build)=tools
tools/env/env_attr.c +1 -1
index 502d4c900bf..4d8536335c3 100644
@@ -1 +1 @@
-#include "../../common/env_attr.c"
+#include "../../env/attr.c"
tools/env/env_flags.c +1 -1
index b261cb8e390..71e13e2021f 100644
@@ -1 +1 @@
-#include "../../common/env_flags.c"
+#include "../../env/flags.c"
Signature · 1 line
2.14.1.342.g6490525c54-goog
#1 lore raw

PATCH 1/1 env: Fix operation of 'make environ'

Quoted 13 lines · Simon Glass

This was broken by the recent environment refactoring. Specifically:

$  make environ
scripts/Makefile.build:59: tools/environ/Makefile: No such file or directory
make[1]: *** No rule to make target 'tools/environ/Makefile'.  Stop.
make: *** [Makefile:1469: environ] Error 2

Fix this by updating the Makefile and adjusting the #include filesnames in two C files.

Fixes ec74f5f (Makefile: Rename 'env' target to 'environ')
Quoted 6 lines

---

 Makefile              | 2 +-
 tools/env/env_attr.c  | 2 +-
 tools/env/env_flags.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

This still breaks any build scripts using the old target (yes, there are many). That's probably acceptable, but a mention of it in some release note would be nice.

Come to think of it, if we're anyway going to break things, how about giving that target a more descriptive name than environ? I suggest envtools.

Quoted 30 lines
Makefile +1 -1
index a0f3bfd2a52..dd9d5678118 100644
@@ -1466,7 +1466,7 @@ checkarmreloc: u-boot
 	fi
 
 environ: scripts_basic
-	$(Q)$(MAKE) $(build)=tools/$@
+	$(Q)$(MAKE) $(build)=tools/env
 
 tools-only: scripts_basic $(version_h) $(timestamp_h)
 	$(Q)$(MAKE) $(build)=tools
tools/env/env_attr.c +1 -1
index 502d4c900bf..4d8536335c3 100644
@@ -1 +1 @@
-#include "../../common/env_attr.c"
+#include "../../env/attr.c"
tools/env/env_flags.c +1 -1
index b261cb8e390..71e13e2021f 100644
@@ -1 +1 @@
-#include "../../common/env_flags.c"
+#include "../../env/flags.c"
Signature · 1 line
2.14.1.342.g6490525c54-goog
Signature · 1 line
M책ns Rullg책rd
#2 lore raw

PATCH 1/1 env: Fix operation of 'make environ'

Quoted 16 lines · M책ns Rullg책rd
Quoted 7 lines · Simon Glass

This was broken by the recent environment refactoring. Specifically:

$  make environ
scripts/Makefile.build:59: tools/environ/Makefile: No such file or directory
make[1]: *** No rule to make target 'tools/environ/Makefile'.  Stop.
make: *** [Makefile:1469: environ] Error 2
Quoted 6 lines

Fix this by updating the Makefile and adjusting the #include filesnames in two C files.

Fixes ec74f5f (Makefile: Rename 'env' target to 'environ')
Quoted 7 lines

This still breaks any build scripts using the old target (yes, there are many). That's probably acceptable, but a mention of it in some release note would be nice.

Come to think of it, if we're anyway going to break things, how about giving that target a more descriptive name than environ? I suggest envtools.

Too early, no coffee. Can't we do some make logic so that 'env' is still a target and thus we don't break those scripts? Otherwise, yes, I'll make sure to indicate in at least the v2017.09 release email that we renamed 'env' to envtools or something. Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170828/22ddbc2a/attachment.sig>
#3 lore raw

PATCH 1/1 env: Fix operation of 'make environ'

Quoted 21 lines · Tom Rini
Quoted 20 lines · M책ns Rullg책rd
Quoted 7 lines · Simon Glass

This was broken by the recent environment refactoring. Specifically:

$  make environ
scripts/Makefile.build:59: tools/environ/Makefile: No such file or directory
make[1]: *** No rule to make target 'tools/environ/Makefile'.  Stop.
make: *** [Makefile:1469: environ] Error 2
Quoted 6 lines

Fix this by updating the Makefile and adjusting the #include filesnames in two C files.

Fixes ec74f5f (Makefile: Rename 'env' target to 'environ')

This still breaks any build scripts using the old target (yes, there are many). That's probably acceptable, but a mention of it in some release note would be nice.

Quoted 8 lines
Quoted 3 lines

Come to think of it, if we're anyway going to break things, how about giving that target a more descriptive name than environ? I suggest envtools.

Too early, no coffee. Can't we do some make logic so that 'env' is still a target and thus we don't break those scripts? Otherwise, yes, I'll make sure to indicate in at least the v2017.09 release email that we renamed 'env' to envtools or something. Thanks!

It's really just building the fw_printenv tool (which uses a symlink for fw_setenv). It seems like a much clearer make target, and source dir for that matter, would be fw_printenv.

-Joe

#4 lore raw

PATCH 1/1 env: Fix operation of 'make environ'

Hi,

Quoted 32 lines · Joe Hershberger
Quoted 21 lines · Tom Rini
Quoted 20 lines · M책ns Rullg책rd
Quoted 7 lines · Simon Glass

This was broken by the recent environment refactoring. Specifically:

$  make environ
scripts/Makefile.build:59: tools/environ/Makefile: No such file or directory
make[1]: *** No rule to make target 'tools/environ/Makefile'.  Stop.
make: *** [Makefile:1469: environ] Error 2
Quoted 6 lines

Fix this by updating the Makefile and adjusting the #include filesnames in two C files.

Fixes ec74f5f (Makefile: Rename 'env' target to 'environ')

This still breaks any build scripts using the old target (yes, there are many). That's probably acceptable, but a mention of it in some release note would be nice.

Quoted 8 lines
Quoted 3 lines

Come to think of it, if we're anyway going to break things, how about giving that target a more descriptive name than environ? I suggest envtools.

Too early, no coffee. Can't we do some make logic so that 'env' is still a target and thus we don't break those scripts? Otherwise, yes, I'll make sure to indicate in at least the v2017.09 release email that we renamed 'env' to envtools or something. Thanks!

Quoted 5 lines

It's really just building the fw_printenv tool (which uses a symlink for fw_setenv). It seems like a much clearer make target, and source dir for that matter, would be fw_printenv.

-Joe

I decided to go with envtools for v2 since even though there is a symlink, there are two tools intended from this.

If you don't like it let me know and I can change it.

I could not figure out how to make the 'env' target build what we have now. We make each subdir a target in the main Makefile, so it just produced a duplicate target.

Regards,
Simon