Patchwork [03/31] Remove useless check for config-host.mak

login
register
mail settings
Submitter Juan Quintela
Date Oct. 7, 2009, 12:40 a.m.
Message ID <c68b19bd67a958d002b96ec70e21d5b1e38280d9.1254875337.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/35191/
State Accepted
Commit e5efe7f5d2ac78a72c9fe3b2217177d2ce1502ec
Headers show

Comments

Juan Quintela - Oct. 7, 2009, 12:40 a.m.
If config-host.mak dont' exist, we have exited in the check at
the beginning of the file.
Once here, move the bits to the else part of the test at the beginning of
the file.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 Makefile |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

Patch

diff --git a/Makefile b/Makefile
index 144b392..9169dd5 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,9 @@  ifneq ($(wildcard config-host.mak),)
 all: build-all
 include config-host.mak
 include $(SRC_PATH)/rules.mak
+config-host.mak: configure
+	@echo $@ is out-of-date, running configure
+	@sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
 else
 config-host.mak:
 	@echo "Please call configure before running make!"
@@ -34,12 +37,6 @@  SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory)
 build-all: config-host.h
 	$(call quiet-command, $(MAKE) $(SUBDIR_MAKEFLAGS) $(TOOLS) $(DOCS) recurse-all,)

-config-host.mak: configure
-ifneq ($(wildcard config-host.mak),)
-	@echo $@ is out-of-date, running configure
-	@sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh
-endif
-
 config-host.h: config-host.h-timestamp
 config-host.h-timestamp: config-host.mak