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>
This commit is contained in:
parent
3f7132d1a3
commit
904fe1fbd1
8
Makefile
8
Makefile
@ -43,9 +43,11 @@ config-all-devices.mak: $(SUBDIR_DEVICES_MAK)
|
|||||||
%/config-devices.mak: default-configs/%.mak
|
%/config-devices.mak: default-configs/%.mak
|
||||||
$(call quiet-command,cat $< > $@.tmp, " GEN $@")
|
$(call quiet-command,cat $< > $@.tmp, " GEN $@")
|
||||||
@if test -f $@; then \
|
@if test -f $@; then \
|
||||||
if cmp -s $@.old $@ || cmp -s $@ $@.tmp; then \
|
if cmp -s $@.old $@; then \
|
||||||
mv $@.tmp $@; \
|
if ! cmp -s $@ $@.tmp; then \
|
||||||
cp -p $@ $@.old; \
|
mv $@.tmp $@; \
|
||||||
|
cp -p $@ $@.old; \
|
||||||
|
fi; \
|
||||||
else \
|
else \
|
||||||
if test -f $@.old; then \
|
if test -f $@.old; then \
|
||||||
echo "WARNING: $@ (user modified) out of date.";\
|
echo "WARNING: $@ (user modified) out of date.";\
|
||||||
|
Loading…
Reference in New Issue
Block a user