aboutsummaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
Diffstat (limited to 'rules')
-rw-r--r--rules/archive.mk2
-rw-r--r--rules/autotools.mk2
-rw-r--r--rules/common.mk13
-rw-r--r--rules/patch.mk2
4 files changed, 12 insertions, 7 deletions
diff --git a/rules/archive.mk b/rules/archive.mk
index 6601862..24b9205 100644
--- a/rules/archive.mk
+++ b/rules/archive.mk
@@ -58,7 +58,7 @@ unpack-%-stamp: validate-%-stamp
touch $@
unpack-stamp: $$(addprefix unpack-,$$(addsuffix -stamp,$$(archives) $$(archive)))
-
+pre-configure-stamp: unpack-stamp
checksum:
@echo '# Insert this into Makefile:'
diff --git a/rules/autotools.mk b/rules/autotools.mk
index b6769d0..108cdca 100644
--- a/rules/autotools.mk
+++ b/rules/autotools.mk
@@ -39,7 +39,7 @@ configure-options = \
--bindir="$(bindir)" \
--includedir="$(includedir)" \
-configure-%-stamp: pre-configure
+configure-%-stamp: pre-configure-stamp
[ -d "$(builddir)" ] || mkdir -p "$(builddir)"
cd "$(builddir)" && \
env $(configure-env) \
diff --git a/rules/common.mk b/rules/common.mk
index edd4917..291b488 100644
--- a/rules/common.mk
+++ b/rules/common.mk
@@ -24,13 +24,17 @@
# include guard:
ifeq (,$(__common_mk))
+# Default:
+bits := 32
+
mach := $(shell uname -p)
mach32 :=
mach64 := amd64
-workdir := $(CURDIR)/work
-sourcedir := $(workdir)/source
-destdir := $(workdir)/proto
+workdir := $(CURDIR)/work
+sourcedir := $(workdir)/source
+destdir.32 := $(workdir)/proto
+destdir.64 := $(workdir)/proto
builddir.32 := $(workdir)/build/32
builddir.64 := $(workdir)/build/64
@@ -66,13 +70,14 @@ includedir = $(includedir.$(bits))
CC = $(CC.$(bits))
CXX = $(CXX.$(bits))
builddir = $(builddir.$(bits))
+destdir = $(destdir.$(bits))
# Common targets for internal usage.
# Some modules (e. g. 32.mk, autotools.mk) add dependencies
# to this, for example configure with autotools
-unpack-stamp patch-stamp configure-stamp build-stamp install-stamp:
+unpack-stamp patch-stamp pre-configure-stamp configure-stamp build-stamp install-stamp:
touch $@
# Common target to use from command line
diff --git a/rules/patch.mk b/rules/patch.mk
index 54ec563..b76e3a3 100644
--- a/rules/patch.mk
+++ b/rules/patch.mk
@@ -38,7 +38,7 @@ applied-%-stamp: $(patchdir)/% unpack-stamp
patch-stamp: $(patches:%=applied-%-stamp)
-pre-configure:: patch-stamp
+pre-configure-stamp: patch-stamp
__patch_mk := included
endif