mirror of
https://xff.cz/git/u-boot/
synced 2025-10-28 17:13:38 +01:00
Replace echo -n's used in environment processing with touch
echo -n does not give the intended effect when invoked in macOS through /bin/sh, which is the shell make uses by default, see "https://stackoverflow.com/questions/11675070/makefile-echo-n-not-working" for a detailed explanation. In this case, it resulted in "-n" being written to env.txt and env.in even though they should be empty, which caused compilation to fail with "Your board uses a text-file environment, so must not define CONFIG_EXTRA_ENV_SETTINGS". This patch prevents the error by replacing echo -n's with touch, as they are used to create empty files in these cases.
This commit is contained in:
4
Makefile
4
Makefile
@@ -1843,7 +1843,7 @@ quiet_cmd_gen_envp = ENVP $@
|
|||||||
-I$(srctree)/arch/$(ARCH)/include \
|
-I$(srctree)/arch/$(ARCH)/include \
|
||||||
$< -o $@; \
|
$< -o $@; \
|
||||||
else \
|
else \
|
||||||
echo -n >$@ ; \
|
touch $@ ; \
|
||||||
fi
|
fi
|
||||||
include/generated/env.in: include/generated/env.txt FORCE
|
include/generated/env.in: include/generated/env.txt FORCE
|
||||||
$(call cmd,gen_envp)
|
$(call cmd,gen_envp)
|
||||||
@@ -1860,7 +1860,7 @@ quiet_cmd_envc = ENVC $@
|
|||||||
elif [ -n "$(ENV_SOURCE_FILE)" ]; then \
|
elif [ -n "$(ENV_SOURCE_FILE)" ]; then \
|
||||||
echo "Missing file $(ENV_FILE_CFG)"; \
|
echo "Missing file $(ENV_FILE_CFG)"; \
|
||||||
else \
|
else \
|
||||||
echo -n >$@ ; \
|
touch $@ ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
include/generated/env.txt: $(wildcard $(ENV_FILE)) FORCE
|
include/generated/env.txt: $(wildcard $(ENV_FILE)) FORCE
|
||||||
|
|||||||
Reference in New Issue
Block a user