summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-10-02 14:28:08 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-10-02 14:28:08 +0000
commit904fe1fbd10388f384c9930fa2d8a25113b7e7aa (patch)
treef9518052e59d1c5792f0b8b4bc2dca56953ee305 /Makefile
parent3f7132d1a35040331ae4541f010713b835be75e3 (diff)
Makefile: fix config-devices.mak generation
The logic of detecting changes in default-configs/*.mak is flawed as can be demonstrated by 'touch default-configs/*.mak' followed by make. This results in a message claiming that user made changes to the */config-devices.mak files. Fix by separating the detection of changes made by the user and changes in the default-configs. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index fca1e7a51..7c71c83a1 100644
--- a/Makefile
+++ b/Makefile
@@ -43,9 +43,11 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
%/config-devices.mak: default-configs/%.mak
$(call quiet-command,cat $< > $@.tmp, " GEN $@")
@if test -f $@; then \
- if cmp -s $@.old $@ || cmp -s $@ $@.tmp; then \
- mv $@.tmp $@; \
- cp -p $@ $@.old; \
+ if cmp -s $@.old $@; then \
+ if ! cmp -s $@ $@.tmp; then \
+ mv $@.tmp $@; \
+ cp -p $@ $@.old; \
+ fi; \
else \
if test -f $@.old; then \
echo "WARNING: $@ (user modified) out of date.";\