Makefile: Update unmodified config-devices.mak automatically
This makes rebuilds after source updates easier for most users (who don't edit config-devices.mak). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
076d247142
commit
012f087923
10
Makefile
10
Makefile
@ -43,11 +43,21 @@ 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 \
|
||||||
|
mv $@.tmp $@; \
|
||||||
|
cp -p $@ $@.old; \
|
||||||
|
else \
|
||||||
|
if test -f $@.old; then \
|
||||||
|
echo "WARNING: $@ (user modified) out of date.";\
|
||||||
|
else \
|
||||||
echo "WARNING: $@ out of date.";\
|
echo "WARNING: $@ out of date.";\
|
||||||
|
fi; \
|
||||||
echo "Run \"make defconfig\" to regenerate."; \
|
echo "Run \"make defconfig\" to regenerate."; \
|
||||||
rm $@.tmp; \
|
rm $@.tmp; \
|
||||||
|
fi; \
|
||||||
else \
|
else \
|
||||||
mv $@.tmp $@; \
|
mv $@.tmp $@; \
|
||||||
|
cp -p $@ $@.old; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
defconfig:
|
defconfig:
|
||||||
|
Loading…
Reference in New Issue
Block a user