summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-01-09 14:18:01 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-01-09 14:18:01 +0000
commitc1f00c5cda37d0583ca291fc2f3318bb1a398ffa (patch)
treed8613b5f4994f4e3f7f3f012f7642a036e28da7e /Makefile
parent54596379b444e6a526c99428aaad54444dc71e34 (diff)
downloadflashrom-c1f00c5cda37d0583ca291fc2f3318bb1a398ffa.tar.gz
flashrom-c1f00c5cda37d0583ca291fc2f3318bb1a398ffa.tar.bz2
flashrom-c1f00c5cda37d0583ca291fc2f3318bb1a398ffa.zip
Fix Makefile dependencies if FT2232SPI is not selected
.features was always regenerated in that case, triggering whole-project recompiles even if nothing changed. Corresponding to flashrom svn r844. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Sean Nelson <audiohacked@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d2f04ec3e..423e31533 100644
--- a/Makefile
+++ b/Makefile
@@ -136,8 +136,8 @@ PROGRAMMER_OBJS += satasii.o
NEED_PCI := yes
endif
-FTDILIBS := $(shell pkg-config --libs libftdi 2>/dev/null || printf "%s" "-lftdi -lusb")
ifeq ($(CONFIG_FT2232SPI), yes)
+FTDILIBS := $(shell pkg-config --libs libftdi 2>/dev/null || printf "%s" "-lftdi -lusb")
# This is a totally ugly hack.
FEATURE_CFLAGS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-D'FT2232_SPI_SUPPORT=1'")
FEATURE_LIBS += $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "$(FTDILIBS)")
@@ -280,7 +280,8 @@ features: compiler
@rm -f .featuretest.c .featuretest
else
features: compiler
- @echo "FEATURES := yes" > .features
+ @echo "FEATURES := yes" > .features.tmp
+ @$(DIFF) -q .features.tmp .features >/dev/null 2>&1 && rm .features.tmp || mv .features.tmp .features
endif
install: $(PROGRAM)