Module: sip-router
Branch: 3.1
Commit: 9e451170ecb2b6aebf583e6e22960cb65813c69d
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9e45117…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Apr 29 17:38:29 2011 +0200
Makefile.defs: moved setting of dirs after target ARCH detection
- should fix FS#128 - error building deb packages on chroot systems
reported by Ali Onur Uyar
(cherry picked from commit 7bb701b79d769f0c7d79d367521a1f984b35fa64)
---
Makefile.defs | 202 ++++++++++++++++++++++++++++----------------------------
1 files changed, 101 insertions(+), 101 deletions(-)
diff --git a/Makefile.defs b/Makefile.defs
index 7d6d267..d6d8c6d 100644
--- a/Makefile.defs
+++ b/Makefile.defs
@@ -225,107 +225,6 @@ endif
# extra CC command line options (e.g -march=athlon-mp)
CC_EXTRA_OPTS ?=
-LIBDIR ?=
-ifeq ($(LIBDIR),)
-ARCHBSZ= $(shell echo $(HOST_ARCH) | sed -e 's/.*64.*/64b/')
-ifeq ($(ARCHBSZ),64b)
- LIBDIR = lib64
-else
- LIBDIR = lib
-endif
-endif
-
-# dirs
-cfg_dir = etc/$(MAIN_NAME)/
-bin_dir = sbin/
-share_dir = share/$(MAIN_NAME)/
-# lib/$(MAIN_NAME)/modules , lib/$(MAIN_NAME)/modules-s, lib/$(MAIN_NAME)/modules-k
-modules_dir = $(LIBDIR)/$(MAIN_NAME)/
-lib_dir = $(LIBDIR)/$(MAIN_NAME)/
-
-doc_dir = doc/$(MAIN_NAME)/
-man_dir = man/
-data_dir = $(MAIN_NAME)/
-
-ifeq ($(OS), linux)
- doc_dir = share/doc/$(MAIN_NAME)/
- man_dir = share/man/
- data_dir = share/$(MAIN_NAME)/
- LOCALBASE ?= /usr/local
-endif
-
-ifeq ($(OS), freebsd)
- doc_dir = share/doc/$(MAIN_NAME)/
- man_dir = man/
- data_dir = share/$(MAIN_NAME)/
- LOCALBASE ?= /usr/local
-endif
-
-ifeq ($(OS), openbsd)
- doc_dir = share/doc/$(MAIN_NAME)/
- man_dir = man/
- data_dir = share/$(MAIN_NAME)/
- LOCALBASE ?= /usr/local
-endif
-
-ifeq ($(OS), netbsd)
- doc_dir = share/doc/$(MAIN_NAME)/
- man_dir = man/
- data_dir = share/$(MAIN_NAME)/
- LOCALBASE ?= /usr/pkg
-endif
-
-ifeq ($(OS), dragonfly)
- doc_dir = share/doc/$(MAIN_NAME)/
- man_dir = man/
- data_dir = share/$(MAIN_NAME)/
- LOCALBASE ?= /usr/pkg
-endif
-
-ifeq ($(OS), darwin)
- doc_dir = share/doc/$(MAIN_NAME)/
- man_dir = man/
- data_dir = share/$(MAIN_NAME)/
- LOCALBASE ?= /usr/local
-endif
-
-LOCALBASE ?= /usr/local
-
-# Doxygen directory
-doxygen_dir=doc/doxygen
-
-# install location
-PREFIX ?= $(LOCALBASE)
-prefix = $(PREFIX)
-# install path is $(basedir) $(prefix)
-# example:
-# creating a bin. archive in /tmp, which unpacks in /usr/local
-# basedir=/tmp
-# prefix=/usr/local
-
-BASEDIR ?= $(DESTDIR)
-basedir = $(BASEDIR)
-# install prefixes for various stuff
-cfg_prefix = $(basedir)$(prefix)
-bin_prefix = $(basedir)$(prefix)
-modules_prefix = $(basedir)$(prefix)
-lib_prefix = $(basedir)$(prefix)
-doc_prefix = $(basedir)$(prefix)
-man_prefix = $(basedir)$(prefix)
-ut_prefix = $(basedir)$(prefix)
-share_prefix = $(basedir)$(prefix)
-data_prefix = $(basedir)$(prefix)
-
-
-# target dirs for various stuff
-cfg_target = $(prefix)/$(cfg_dir)
-bin_target = $(prefix)/$(bin_dir)
-#modules_target = $(prefix)/$(modules_dir)
-lib_target = $(prefix)/$(lib_dir)
-doc_target = $(prefix)/$(doc_dir)
-data_target = $(prefix)/$(data_dir)
-
-
ifeq ($(OS), solaris)
#use GNU versions
@@ -510,6 +409,107 @@ ARCH:=$(HOST_ARCH)
endif
$(info target architecture <$(ARCH)>, host architecture <$(HOST_ARCH)>)
+LIBDIR ?=
+ifeq ($(LIBDIR),)
+ARCHBSZ= $(shell echo $(ARCH) | sed -e 's/.*64.*/64b/')
+ifeq ($(ARCHBSZ),64b)
+ LIBDIR = lib64
+else
+ LIBDIR = lib
+endif
+endif
+
+# dirs
+cfg_dir = etc/$(MAIN_NAME)/
+bin_dir = sbin/
+share_dir = share/$(MAIN_NAME)/
+# lib/$(MAIN_NAME)/modules , lib/$(MAIN_NAME)/modules-s, lib/$(MAIN_NAME)/modules-k
+modules_dir = $(LIBDIR)/$(MAIN_NAME)/
+lib_dir = $(LIBDIR)/$(MAIN_NAME)/
+
+doc_dir = doc/$(MAIN_NAME)/
+man_dir = man/
+data_dir = $(MAIN_NAME)/
+
+ifeq ($(OS), linux)
+ doc_dir = share/doc/$(MAIN_NAME)/
+ man_dir = share/man/
+ data_dir = share/$(MAIN_NAME)/
+ LOCALBASE ?= /usr/local
+endif
+
+ifeq ($(OS), freebsd)
+ doc_dir = share/doc/$(MAIN_NAME)/
+ man_dir = man/
+ data_dir = share/$(MAIN_NAME)/
+ LOCALBASE ?= /usr/local
+endif
+
+ifeq ($(OS), openbsd)
+ doc_dir = share/doc/$(MAIN_NAME)/
+ man_dir = man/
+ data_dir = share/$(MAIN_NAME)/
+ LOCALBASE ?= /usr/local
+endif
+
+ifeq ($(OS), netbsd)
+ doc_dir = share/doc/$(MAIN_NAME)/
+ man_dir = man/
+ data_dir = share/$(MAIN_NAME)/
+ LOCALBASE ?= /usr/pkg
+endif
+
+ifeq ($(OS), dragonfly)
+ doc_dir = share/doc/$(MAIN_NAME)/
+ man_dir = man/
+ data_dir = share/$(MAIN_NAME)/
+ LOCALBASE ?= /usr/pkg
+endif
+
+ifeq ($(OS), darwin)
+ doc_dir = share/doc/$(MAIN_NAME)/
+ man_dir = man/
+ data_dir = share/$(MAIN_NAME)/
+ LOCALBASE ?= /usr/local
+endif
+
+LOCALBASE ?= /usr/local
+
+# Doxygen directory
+doxygen_dir=doc/doxygen
+
+# install location
+PREFIX ?= $(LOCALBASE)
+prefix = $(PREFIX)
+# install path is $(basedir) $(prefix)
+# example:
+# creating a bin. archive in /tmp, which unpacks in /usr/local
+# basedir=/tmp
+# prefix=/usr/local
+
+BASEDIR ?= $(DESTDIR)
+basedir = $(BASEDIR)
+# install prefixes for various stuff
+cfg_prefix = $(basedir)$(prefix)
+bin_prefix = $(basedir)$(prefix)
+modules_prefix = $(basedir)$(prefix)
+lib_prefix = $(basedir)$(prefix)
+doc_prefix = $(basedir)$(prefix)
+man_prefix = $(basedir)$(prefix)
+ut_prefix = $(basedir)$(prefix)
+share_prefix = $(basedir)$(prefix)
+data_prefix = $(basedir)$(prefix)
+
+
+# target dirs for various stuff
+cfg_target = $(prefix)/$(cfg_dir)
+bin_target = $(prefix)/$(bin_dir)
+#modules_target = $(prefix)/$(modules_dir)
+lib_target = $(prefix)/$(lib_dir)
+doc_target = $(prefix)/$(doc_dir)
+data_target = $(prefix)/$(data_dir)
+
+
# compile-time options
#
# -DSTATS