summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-04-27 12:27:56 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-04-27 12:29:23 (EDT)
commitd89c3cab7255da434ed582bce822e45ae8cea5df (patch)
tree55f0ed678a174c1d24d2c111134b8793e8ae2d24 /build
parent53525883f7f6b31b00de6b571f404b57a7063d8e (diff)
build: Better organize some things.
Diffstat (limited to 'build')
-rwxr-xr-xbuild23
1 files changed, 12 insertions, 11 deletions
diff --git a/build b/build
index b196741..1d5efea 100755
--- a/build
+++ b/build
@@ -1,7 +1,19 @@
#!/usr/bin/make -f
+# POSIX.1-2008:
+# If the pathname does not begin with a '/' it shall be treated as relative to
+# the current working directory of the process, not relative to the directory
+# containing the makefile.
+include ../source.mk
+include ../targets.mk
+
base_version = $$(printf '%s\n' '$(OPK_SOURCE)' | sed 's/^gcc-//')
+target = $$(printf '%s' '$@' | sed 's/^[a-z]*-//')
+
+builddir = obj-$(target)
+destdir = dest-$(target)
+
# /usr/lib/<target>/ld.so is a symbolic link for use by GCC to find the system's
# dynamic linker. It should be provided by the development package of any
# standard C library.
@@ -42,11 +54,6 @@ bootstrap1_opts = \
--disable-libmudflap \
--disable-libssp
-include ../targets.mk
-target = $$(printf '%s' '$@' | sed 's/^[a-z]*-//')
-builddir = obj-$(target)
-destdir = dest-$(target)
-
nop:
@:
@@ -280,9 +287,3 @@ $(installcross_targets):
oh-installfiles -d "$(destdir)"
install: $(install_targets)
-
-# POSIX.1-2008:
-# If the pathname does not begin with a '/' it shall be treated as relative to
-# the current working directory of the process, not relative to the directory
-# containing the makefile.
-include ../source.mk