summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-01-26 14:26:49 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-02-05 19:34:07 -0600
commit843999008182ec71b16b2c3f0a1380396c5c7e8c (patch)
tree66eb6b8dd09968f06813cf087d82d28ae9b340c9 /Makefile
parentgb_WinResTarget__command never has 3 parameters (diff)
downloadcore-843999008182ec71b16b2c3f0a1380396c5c7e8c.tar.gz
core-843999008182ec71b16b2c3f0a1380396c5c7e8c.zip
autogen when necessary and restart the make..
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 22 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 350867671016..2f592c094ccb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-.PHONY : all bootstrap fetch build clean clean-build clean-host
+.PHONY : all autogen bootstrap fetch build clean clean-build clean-host
all: build
SHELL=/usr/bin/env bash
@@ -326,9 +326,27 @@ cmd:
endif
#
+# autogen
+#
+autogen: Makefile
+
+# I don't like to touch stuff that are supposed to be
+# in the source tree, hence read-only
+# but I couldn't find a way to get make to
+# restart after an autogen. and we _have_ to
+# restart since autogen can have changed
+# config_host.k which is included in this
+# Makefile
+Makefile: config_host.mk
+ touch $@
+
+config_host.mk : config_host.mk.in bin/repo-list.in ooo.lst.in configure.in autogen.lastrun
+ ./autogen.sh
+
+#
# Bootstap
#
-$(WORKDIR)/bootstrap:
+$(WORKDIR)/bootstrap: autogen
@cd $(SRCDIR) && ./bootstrap
@mkdir -p $(dir $@) && touch $@
@@ -339,8 +357,8 @@ bootstrap: $(WORKDIR)/bootstrap
#
fetch: src.downloaded
-src.downloaded : ooo.lst download
-ifeq (@DO_FETCH_TARBALLS@,YES)
+src.downloaded : autogen ooo.lst download
+ifeq ($(DO_FETCH_TARBALLS),YES)
./download $(SRCDIR)/ooo.lst && touch $@
else
@echo "Automatic fetching of external tarballs is disabled."