summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-06-21 07:41:41 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-06-21 07:41:41 +0200
commit90f603e2be40d996c421ae8e95464e38911eabaf (patch)
treea3a8aa942a9acf078eed1333404de22aaa106219 /mk
parentf9292cf478867567f80ad270d4351e9a48ef4d06 (diff)
s/TOPDIR/ADK_TOPDIR/
to avoid namespace collisions in some packages, rename TOPDIR. Sorry you need to make cleandir && make prereq && make
Diffstat (limited to 'mk')
-rw-r--r--mk/build.mk136
-rw-r--r--mk/buildhlp.mk6
-rw-r--r--mk/image.mk8
-rw-r--r--mk/kernel-build.mk10
-rw-r--r--mk/kernel.mk2
-rw-r--r--mk/package.mk2
-rw-r--r--mk/vars.mk4
7 files changed, 84 insertions, 84 deletions
diff --git a/mk/build.mk b/mk/build.mk
index 51d35cd86..ec4561c7f 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -1,8 +1,8 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
-TOPDIR=$(shell pwd)
-export TOPDIR
+ADK_TOPDIR=$(shell pwd)
+export ADK_TOPDIR
ifneq ($(shell umask 2>/dev/null | sed 's/0*022/OK/'),OK)
$(error your umask is not 022)
@@ -101,7 +101,7 @@ POSTCONFIG= -@\
if [ -f .adkinit ];then rm .adkinit;\
else \
if [ -f .config.old ];then \
- $(TOPDIR)/adk/tools/pkgrebuild;\
+ $(ADK_TOPDIR)/adk/tools/pkgrebuild;\
rebuild=0; \
if [ "$$(grep ^BUSYBOX .config|md5sum)" != "$$(grep ^BUSYBOX .config.old|md5sum)" ];then \
touch .rebuild.busybox;\
@@ -140,17 +140,17 @@ POSTCONFIG= -@\
# Pull in the user's configuration file
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
--include $(TOPDIR)/.config
+-include $(ADK_TOPDIR)/.config
endif
ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
-include $(TOPDIR)/rules.mk
+include $(ADK_TOPDIR)/rules.mk
all: world
-${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/Makefile) $(TOPDIR)/adk/tools/depmaker
+${ADK_TOPDIR}/package/Depends.mk: ${ADK_TOPDIR}/.config $(wildcard ${ADK_TOPDIR}/package/*/Makefile) $(ADK_TOPDIR)/adk/tools/depmaker
@echo "Generating dependencies ..."
- $(TOPDIR)/adk/tools/depmaker > ${TOPDIR}/package/Depends.mk
+ $(ADK_TOPDIR)/adk/tools/depmaker > ${ADK_TOPDIR}/package/Depends.mk
.NOTPARALLEL:
.PHONY: all world clean cleandir cleansystem distclean image_clean
@@ -158,7 +158,7 @@ ${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/M
world:
@mkdir -p $(DL_DIR) $(HOST_BUILD_DIR) $(BUILD_DIR) $(TARGET_DIR) $(FW_DIR) \
$(STAGING_HOST_DIR) $(TOOLCHAIN_BUILD_DIR) $(STAGING_PKG_DIR)/stamps
- ${BASH} ${TOPDIR}/scripts/scan-pkgs.sh
+ ${BASH} ${ADK_TOPDIR}/scripts/scan-pkgs.sh
ifeq ($(ADK_TARGET_TOOLCHAIN),y)
ifeq ($(ADK_TOOLCHAIN_ONLY),y)
$(MAKE) -f mk/build.mk package/hostcompile toolchain/fixup package/compile
@@ -172,7 +172,7 @@ endif
package_index:
ifeq ($(ADK_TARGET_PACKAGE_IPKG),y)
-cd ${PACKAGE_DIR} && \
- ${BASH} ${TOPDIR}/scripts/ipkg-make-index.sh . >Packages
+ ${BASH} ${ADK_TOPDIR}/scripts/ipkg-make-index.sh . >Packages
endif
${STAGING_TARGET_DIR} ${STAGING_TARGET_DIR}/etc ${STAGING_HOST_DIR}:
@@ -189,7 +189,7 @@ ifeq ($(ADK_TARGET_PACKAGE_IPKG),y)
echo "option offline_root ${TARGET_DIR}" >>$(STAGING_TARGET_DIR)/etc/ipkg.conf
endif
-package/%: ${STAGING_TARGET_DIR}/etc/ipkg.conf ${TOPDIR}/package/Depends.mk
+package/%: ${STAGING_TARGET_DIR}/etc/ipkg.conf ${ADK_TOPDIR}/package/Depends.mk
$(MAKE) -C package $(patsubst package/%,%,$@)
target/%:
@@ -213,11 +213,11 @@ kernelconfig:
# create a new package from package/.template
newpackage:
@echo "Creating new package $(PKG)"
- $(CP) $(TOPDIR)/package/.template$(TYPE) $(TOPDIR)/package/$(PKG)
+ $(CP) $(ADK_TOPDIR)/package/.template$(TYPE) $(ADK_TOPDIR)/package/$(PKG)
pkg=$$(echo $(PKG)|tr '[:lower:]-' '[:upper:]_'); \
- $(SED) "s#@UPKG@#$$pkg#" $(TOPDIR)/package/$(PKG)/Makefile
- $(SED) 's#@PKG@#$(PKG)#' $(TOPDIR)/package/$(PKG)/Makefile
- $(SED) 's#@VER@#$(VER)#' $(TOPDIR)/package/$(PKG)/Makefile
+ $(SED) "s#@UPKG@#$$pkg#" $(ADK_TOPDIR)/package/$(PKG)/Makefile
+ $(SED) 's#@PKG@#$(PKG)#' $(ADK_TOPDIR)/package/$(PKG)/Makefile
+ $(SED) 's#@VER@#$(VER)#' $(ADK_TOPDIR)/package/$(PKG)/Makefile
@echo "Edit package/$(PKG)/Makefile to complete"
root_clean:
@@ -241,8 +241,8 @@ clean:
rm ${STAGING_PKG_DIR}/$$f ; \
done
rm -rf $(BUILD_DIR) $(FW_DIR) $(TARGET_DIR) \
- ${TOPDIR}/package/pkglist.d
- rm -f ${TOPDIR}/package/Depends.mk
+ ${ADK_TOPDIR}/package/pkglist.d
+ rm -f ${ADK_TOPDIR}/package/Depends.mk
cleankernel:
@$(TRACE) cleankernel
@@ -252,36 +252,36 @@ cleandir:
@$(TRACE) cleandir
@$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE)
@rm -rf $(BUILD_DIR_PFX) $(FW_DIR_PFX) $(TARGET_DIR_PFX) \
- ${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d
+ ${ADK_TOPDIR}/package/pkglist.d ${ADK_TOPDIR}/package/pkgconfigs.d
@rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX)
@rm -rf $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX)
- @rm -f .menu .tmpconfig.h .rebuild* ${TOPDIR}/package/Depends.mk ${TOPDIR}/prereq.mk
+ @rm -f .menu .tmpconfig.h .rebuild* ${ADK_TOPDIR}/package/Depends.mk ${ADK_TOPDIR}/prereq.mk
cleansystem:
@$(TRACE) cleansystem
@$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE)
@rm -rf $(BUILD_DIR) $(FW_DIR) $(TARGET_DIR) \
- ${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d
+ ${ADK_TOPDIR}/package/pkglist.d ${ADK_TOPDIR}/package/pkgconfigs.d
@rm -rf $(TOOLCHAIN_DIR) $(STAGING_TARGET_DIR) $(STAGING_PKG_DIR) $(TOOLCHAIN_BUILD_DIR)
- @rm -f .menu .tmpconfig.h .rebuild* ${TOPDIR}/package/Depends.mk ${TOPDIR}/prereq.mk
+ @rm -f .menu .tmpconfig.h .rebuild* ${ADK_TOPDIR}/package/Depends.mk ${ADK_TOPDIR}/prereq.mk
distclean:
@$(TRACE) distclean
@$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE)
@rm -rf $(BUILD_DIR_PFX) $(FW_DIR_PFX) $(TARGET_DIR_PFX) $(DL_DIR) \
- ${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d
+ ${ADK_TOPDIR}/package/pkglist.d ${ADK_TOPDIR}/package/pkgconfigs.d
@rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_HOST_DIR_PFX)
@rm -rf $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX)
- @rm -f .adkinit .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \
- .menu ${TOPDIR}/package/Depends.mk .ADK_HAVE_DOT_CONFIG .rebuild.* \
- ${TOPDIR}/target/*/Config.in.{arch*,system*} ${TOPDIR}/package/Config.in.auto*
+ @rm -f .adkinit .config* .defconfig .tmpconfig.h all.config ${ADK_TOPDIR}/prereq.mk \
+ .menu ${ADK_TOPDIR}/package/Depends.mk .ADK_HAVE_DOT_CONFIG .rebuild.* \
+ ${ADK_TOPDIR}/target/*/Config.in.{arch*,system*} ${ADK_TOPDIR}/package/Config.in.auto*
else # ! ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
ifeq ($(filter-out distclean,${MAKECMDGOALS}),)
-include ${TOPDIR}/mk/vars.mk
+include ${ADK_TOPDIR}/mk/vars.mk
else
-include $(TOPDIR)/prereq.mk
+include $(ADK_TOPDIR)/prereq.mk
export HOST_CC BASH MAKE LANGUAGE LC_ALL OStype PATH QEMU SHELL
endif
@@ -302,59 +302,59 @@ $(CONFIG)/mconf:
defconfig: .menu $(CONFIG)/conf
ifeq (${OStype},Linux)
- @echo ADK_HOST_LINUX=y > $(TOPDIR)/.defconfig
+ @echo ADK_HOST_LINUX=y > $(ADK_TOPDIR)/.defconfig
endif
ifeq (${OStype},FreeBSD)
- @echo ADK_HOST_FREEBSD=y > $(TOPDIR)/.defconfig
+ @echo ADK_HOST_FREEBSD=y > $(ADK_TOPDIR)/.defconfig
endif
ifeq (${OStype},MirBSD)
- @echo ADK_HOST_MIRBSD=y > $(TOPDIR)/.defconfig
+ @echo ADK_HOST_MIRBSD=y > $(ADK_TOPDIR)/.defconfig
endif
ifeq (${OStype},OpenBSD)
- @echo ADK_HOST_OPENBSD=y > $(TOPDIR)/.defconfig
+ @echo ADK_HOST_OPENBSD=y > $(ADK_TOPDIR)/.defconfig
endif
ifeq (${OStype},NetBSD)
- @echo ADK_HOST_NETBSD=y > $(TOPDIR)/.defconfig
+ @echo ADK_HOST_NETBSD=y > $(ADK_TOPDIR)/.defconfig
endif
ifeq (${OStype},Darwin)
- @echo ADK_HOST_DARWIN=y > $(TOPDIR)/.defconfig
+ @echo ADK_HOST_DARWIN=y > $(ADK_TOPDIR)/.defconfig
endif
ifneq (,$(filter CYGWIN%,${OStype}))
- @echo ADK_HOST_CYGWIN=y > $(TOPDIR)/.defconfig
+ @echo ADK_HOST_CYGWIN=y > $(ADK_TOPDIR)/.defconfig
endif
@if [ ! -z "$(ADK_TARGET_ARCH)" ];then \
grep "^config" target/config/Config.in.arch.choice \
|grep -i "$(ADK_TARGET_ARCH)"\$$ \
|sed -e "s#^config \(.*\)#\1=y#" \
- >> $(TOPDIR)/.defconfig; \
+ >> $(ADK_TOPDIR)/.defconfig; \
fi
@for symbol in ${DEFCONFIG}; do \
- echo $$symbol >> $(TOPDIR)/.defconfig; \
+ echo $$symbol >> $(ADK_TOPDIR)/.defconfig; \
done
@if [ ! -z "$(ADK_TARGET_FS)" ];then \
grep "^config" target/config/Config.in.target \
|grep -i "$(ADK_TARGET_FS)" \
|sed -e "s#^config \(.*\)#\1=y#" \
- >> $(TOPDIR)/.defconfig; \
+ >> $(ADK_TOPDIR)/.defconfig; \
fi
@if [ ! -z "$(ADK_TARGET_COLLECTION)" ];then \
grep -h "^config" target/packages/pkg-available/* \
|grep -i "$(ADK_TARGET_COLLECTION)" \
|sed -e "s#^config \(.*\)#\1=y#" \
- >> $(TOPDIR)/.defconfig; \
+ >> $(ADK_TOPDIR)/.defconfig; \
fi
@if [ ! -z "$(ADK_TARGET_LIBC)" ];then \
grep "^config" target/config/Config.in.libc.choice \
|grep -i "$(ADK_TARGET_LIBC)" \
|sed -e "s#^config \(.*\)#\1=y#" \
- >> $(TOPDIR)/.defconfig; \
+ >> $(ADK_TOPDIR)/.defconfig; \
fi
@if [ ! -z "$(ADK_TARGET_SYSTEM)" ];then \
system=$$(echo "$(ADK_TARGET_SYSTEM)" |sed -e "s/-/_/g"); \
grep -h "^config" target/*/Config.in.systems \
|grep -i "$$system$$" \
|sed -e "s#^config \(.*\)#\1=y#" \
- >> $(TOPDIR)/.defconfig; \
+ >> $(ADK_TOPDIR)/.defconfig; \
fi
@if [ ! -z "$(ADK_TARGET_SYSTEM)" ];then \
$(CONFIG)/conf -D .defconfig $(CONFIG_CONFIG_IN); \
@@ -362,53 +362,53 @@ endif
modconfig:
ifeq (${OStype},Linux)
- @echo ADK_HOST_LINUX=y > $(TOPDIR)/all.config
+ @echo ADK_HOST_LINUX=y > $(ADK_TOPDIR)/all.config
endif
ifeq (${OStype},FreeBSD)
- @echo ADK_HOST_FREEBSD=y > $(TOPDIR)/all.config
+ @echo ADK_HOST_FREEBSD=y > $(ADK_TOPDIR)/all.config
endif
ifeq (${OStype},MirBSD)
- @echo ADK_HOST_MIRBSD=y > $(TOPDIR)/all.config
+ @echo ADK_HOST_MIRBSD=y > $(ADK_TOPDIR)/all.config
endif
ifeq (${OStype},OpenBSD)
- @echo ADK_HOST_OPENBSD=y > $(TOPDIR)/all.config
+ @echo ADK_HOST_OPENBSD=y > $(ADK_TOPDIR)/all.config
endif
ifeq (${OStype},NetBSD)
- @echo ADK_HOST_NETBSD=y > $(TOPDIR)/all.config
+ @echo ADK_HOST_NETBSD=y > $(ADK_TOPDIR)/all.config
endif
ifeq (${OStype},Darwin)
- @echo ADK_HOST_DARWIN=y > $(TOPDIR)/all.config
+ @echo ADK_HOST_DARWIN=y > $(ADK_TOPDIR)/all.config
endif
ifneq (,$(filter CYGWIN%,${OStype}))
- @echo ADK_HOST_CYGWIN=y > $(TOPDIR)/all.config
+ @echo ADK_HOST_CYGWIN=y > $(ADK_TOPDIR)/all.config
endif
@if [ ! -z "$(ADK_TARGET_ARCH)" ];then \
grep "^config" target/config/Config.in.arch.choice \
|grep -i "$(ADK_TARGET_ARCH)"\$$ \
|sed -e "s#^config \(.*\)#\1=y#" \
- >> $(TOPDIR)/all.config; \
+ >> $(ADK_TOPDIR)/all.config; \
fi
@for symbol in ${DEFCONFIG}; do \
- echo $$symbol >> $(TOPDIR)/all.config; \
+ echo $$symbol >> $(ADK_TOPDIR)/all.config; \
done
@if [ ! -z "$(ADK_TARGET_FS)" ];then \
grep "^config" target/config/Config.in.target \
|grep -i "$(ADK_TARGET_FS)" \
|sed -e "s#^config \(.*\)#\1=y#" \
- >> $(TOPDIR)/all.config; \
+ >> $(ADK_TOPDIR)/all.config; \
fi
@if [ ! -z "$(ADK_TARGET_LIBC)" ];then \
grep "^config" target/config/Config.in.libc.choice \
|grep -i "$(ADK_TARGET_LIBC)" \
|sed -e "s#^config \(.*\)#\1=y#" \
- >> $(TOPDIR)/all.config; \
+ >> $(ADK_TOPDIR)/all.config; \
fi
@if [ ! -z "$(ADK_TARGET_SYSTEM)" ];then \
system=$$(echo "$(ADK_TARGET_SYSTEM)" |sed -e "s/-/_/g"); \
grep -h "^config" target/*/Config.in.systems \
|grep -i "$$system" \
|sed -e "s#^config \(.*\)#\1=y#" \
- >> $(TOPDIR)/all.config; \
+ >> $(ADK_TOPDIR)/all.config; \
fi
menuconfig: $(CONFIG)/mconf defconfig .menu
@@ -431,12 +431,12 @@ _mconfig2: ${CONFIG}/conf modconfig .menu
distclean:
@$(MAKE) -C $(CONFIG) clean
@rm -rf $(BUILD_DIR_PFX) $(FW_DIR_PFX) $(TARGET_DIR_PFX) $(DL_DIR) \
- ${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d
+ ${ADK_TOPDIR}/package/pkglist.d ${ADK_TOPDIR}/package/pkgconfigs.d
@rm -rf $(TOOLCHAIN_DIR_PFX) $(STAGING_TARGET_DIR_PFX)
@rm -rf $(STAGING_HOST_DIR_PFX) $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX)
- @rm -f .adkinit .config* .defconfig .tmpconfig.h all.config ${TOPDIR}/prereq.mk \
- .menu .rebuild.* ${TOPDIR}/package/Depends.mk .ADK_HAVE_DOT_CONFIG \
- ${TOPDIR}/target/*/Config.in.{arch*,system*} ${TOPDIR}/package/Config.in.auto*
+ @rm -f .adkinit .config* .defconfig .tmpconfig.h all.config ${ADK_TOPDIR}/prereq.mk \
+ .menu .rebuild.* ${ADK_TOPDIR}/package/Depends.mk .ADK_HAVE_DOT_CONFIG \
+ ${ADK_TOPDIR}/target/*/Config.in.{arch*,system*} ${ADK_TOPDIR}/package/Config.in.auto*
endif # ! ifeq ($(strip $(ADK_HAVE_DOT_CONFIG)),y)
@@ -446,43 +446,43 @@ buildall:
$(GMAKE) ADK_TARGET_ARCH=$(ADK_TARGET_ARCH) ADK_TARGET_SYSTEM=$(ADK_TARGET_SYSTEM) ADK_TARGET_LIBC=$(ADK_TARGET_LIBC) allmodconfig
$(GMAKE) VERBOSE=1 all 2>&1 | tee firmware/buildall.log
-$(TOPDIR)/adk/tools/pkgmaker: $(TOPDIR)/adk/tools/pkgmaker.c $(TOPDIR)/adk/tools/sortfile.c $(TOPDIR)/adk/tools/strmap.c
+$(ADK_TOPDIR)/adk/tools/pkgmaker: $(ADK_TOPDIR)/adk/tools/pkgmaker.c $(ADK_TOPDIR)/adk/tools/sortfile.c $(ADK_TOPDIR)/adk/tools/strmap.c
@$(HOST_CC) $(HOST_CFLAGS) -o $@ adk/tools/pkgmaker.c adk/tools/sortfile.c adk/tools/strmap.c
-$(TOPDIR)/adk/tools/pkgrebuild: $(TOPDIR)/adk/tools/pkgrebuild.c $(TOPDIR)/adk/tools/strmap.c
+$(ADK_TOPDIR)/adk/tools/pkgrebuild: $(ADK_TOPDIR)/adk/tools/pkgrebuild.c $(ADK_TOPDIR)/adk/tools/strmap.c
@$(HOST_CC) $(HOST_CFLAGS) -o $@ adk/tools/pkgrebuild.c adk/tools/strmap.c
-$(TOPDIR)/adk/tools/depmaker: $(TOPDIR)/adk/tools/depmaker.c
- @$(HOST_CC) $(HOST_CFLAGS) -o $@ $(TOPDIR)/adk/tools/depmaker.c
+$(ADK_TOPDIR)/adk/tools/depmaker: $(ADK_TOPDIR)/adk/tools/depmaker.c
+ @$(HOST_CC) $(HOST_CFLAGS) -o $@ $(ADK_TOPDIR)/adk/tools/depmaker.c
-menu .menu: $(wildcard package/*/Makefile) $(wildcard target/*/systems) $(wildcard target/*/systems/*) $(TOPDIR)/adk/tools/pkgmaker $(TOPDIR)/adk/tools/pkgrebuild
+menu .menu: $(wildcard package/*/Makefile) $(wildcard target/*/systems) $(wildcard target/*/systems/*) $(ADK_TOPDIR)/adk/tools/pkgmaker $(ADK_TOPDIR)/adk/tools/pkgrebuild
@echo "Generating menu structure ..."
- @$(BASH) $(TOPDIR)/scripts/create-menu
- @$(TOPDIR)/adk/tools/pkgmaker
+ @$(BASH) $(ADK_TOPDIR)/scripts/create-menu
+ @$(ADK_TOPDIR)/adk/tools/pkgmaker
@:>.menu
-dep: $(TOPDIR)/adk/tools/depmaker
+dep: $(ADK_TOPDIR)/adk/tools/depmaker
@echo "Generating dependencies ..."
- @$(TOPDIR)/adk/tools/depmaker > ${TOPDIR}/package/Depends.mk
+ @$(ADK_TOPDIR)/adk/tools/depmaker > ${ADK_TOPDIR}/package/Depends.mk
.PHONY: menu dep
-include $(TOPDIR)/toolchain/gcc/Makefile.inc
+include $(ADK_TOPDIR)/toolchain/gcc/Makefile.inc
check-dejagnu:
@-rm adk/tests/adk.exp adk/tests/master.exp >/dev/null 2>&1
@sed -e "s#@ADK_TARGET_IP@#$(ADK_TARGET_IP)#" \
-e "s#@ADK_TARGET_PORT@#$(ADK_TARGET_PORT)#" \
adk/tests/adk.exp.in > adk/tests/adk.exp
- @sed -e "s#@TOPDIR@#$(TOPDIR)#" adk/tests/master.exp.in > \
+ @sed -e "s#@ADK_TOPDIR@#$(ADK_TOPDIR)#" adk/tests/master.exp.in > \
adk/tests/master.exp
check-gcc: check-dejagnu
- env DEJAGNU=$(TOPDIR)/adk/tests/master.exp \
+ env DEJAGNU=$(ADK_TOPDIR)/adk/tests/master.exp \
$(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/$(PKG_NAME)-$(PKG_VERSION)-final/gcc check-gcc
check-g++: check-dejagnu
- env DEJAGNU=$(TOPDIR)/adk/tests/master.exp \
+ env DEJAGNU=$(ADK_TOPDIR)/adk/tests/master.exp \
$(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/$(PKG_NAME)-$(PKG_VERSION)-final/gcc check-g++
check: check-gcc check-g++
diff --git a/mk/buildhlp.mk b/mk/buildhlp.mk
index 6724faf0a..45620e6ac 100644
--- a/mk/buildhlp.mk
+++ b/mk/buildhlp.mk
@@ -40,7 +40,7 @@ fetch refetch checksum do-extract:
__use_generic_patch_target:=42
else ifneq ($(strip ${DISTFILES}),)
-include ${TOPDIR}/mk/fetch.mk
+include ${ADK_TOPDIR}/mk/fetch.mk
${WRKDIST}/.extract_done: ${_CHECKSUM_COOKIE}
ifeq (${_CHECKSUM_COOKIE},)
@@ -56,7 +56,7 @@ endif
__use_generic_patch_target:=42
else
-include ${TOPDIR}/mk/fetch.mk
+include ${ADK_TOPDIR}/mk/fetch.mk
${WRKDIST}/.extract_done: ${_CHECKSUM_COOKIE}
$(MAKE) fetch
ifeq (${_CHECKSUM_COOKIE},)
@@ -102,6 +102,6 @@ endif
WRKDIR1=$(call shellescape,${WRKDIR}) \
PATH=$(call shellescape,${HOST_PATH}) \
$(call shellexport,DIFF_IGNOREFILES) \
- mksh ${TOPDIR}/scripts/update-patches2
+ mksh ${ADK_TOPDIR}/scripts/update-patches2
.PHONY: update-patches host-update-patches
diff --git a/mk/image.mk b/mk/image.mk
index 7fc46f6b2..cfd50f475 100644
--- a/mk/image.mk
+++ b/mk/image.mk
@@ -31,13 +31,13 @@ endif
imageprepare: image-prepare-post extra-install
-# if an extra directory exist in TOPDIR, copy all content over the
+# if an extra directory exist in ADK_TOPDIR, copy all content over the
# root directory, do the same if make extra=/dir/to/extra is used
extra-install:
- @-if [ -h ${TARGET_DIR}/etc/resolv.conf -a -f $(TOPDIR)/extra/etc/resolv.conf ];then \
+ @-if [ -h ${TARGET_DIR}/etc/resolv.conf -a -f $(ADK_TOPDIR)/extra/etc/resolv.conf ];then \
rm ${TARGET_DIR}/etc/resolv.conf;\
fi
- @if [ -d $(TOPDIR)/extra ];then $(CP) $(TOPDIR)/extra/* ${TARGET_DIR};fi
+ @if [ -d $(ADK_TOPDIR)/extra ];then $(CP) $(ADK_TOPDIR)/extra/* ${TARGET_DIR};fi
@if [ ! -z $(extra) ];then $(CP) $(extra)/* ${TARGET_DIR};fi
image-prepare-post:
@@ -57,7 +57,7 @@ image-prepare-post:
> $(TARGET_DIR)/etc/.adkversion
echo $(ADK_TARGET_SYSTEM) > $(TARGET_DIR)/etc/.adktarget
ifneq (${ADK_PACKAGE_CONFIG_IN_ETC},)
- gzip -9c ${TOPDIR}/.config > $(TARGET_DIR)/etc/adkconfig.gz
+ gzip -9c ${ADK_TOPDIR}/.config > $(TARGET_DIR)/etc/adkconfig.gz
chmod 600 $(TARGET_DIR)/etc/adkconfig.gz
endif
ifneq ($(ADK_LINUX_X86_64)$(ADK_LINUX_PPC64)$(ADK_LINUX_SPARC64)$(ADK_TARGET_ABI_N32)$(ADK_TARGET_ABI_N64),)
diff --git a/mk/kernel-build.mk b/mk/kernel-build.mk
index 29117f3b7..b66f71132 100644
--- a/mk/kernel-build.mk
+++ b/mk/kernel-build.mk
@@ -1,10 +1,10 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
-include $(TOPDIR)/rules.mk
-include ${TOPDIR}/mk/kernel-ver.mk
-include $(TOPDIR)/mk/linux.mk
-include ${TOPDIR}/mk/kernel-vars.mk
+include $(ADK_TOPDIR)/rules.mk
+include ${ADK_TOPDIR}/mk/kernel-ver.mk
+include $(ADK_TOPDIR)/mk/linux.mk
+include ${ADK_TOPDIR}/mk/kernel-vars.mk
KERNEL_FILE:=$(ADK_TARGET_KERNEL)
KERNEL_TARGET:=$(ADK_TARGET_KERNEL)
@@ -31,7 +31,7 @@ $(LINUX_DIR)/.prepared: $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PK
mkdir -p $(LINUX_BUILD_DIR)/kmod-control
touch $@
-$(LINUX_DIR)/.config: $(LINUX_DIR)/.prepared $(BUILD_DIR)/.kernelconfig $(TOPDIR)/mk/modules.mk
+$(LINUX_DIR)/.config: $(LINUX_DIR)/.prepared $(BUILD_DIR)/.kernelconfig $(ADK_TOPDIR)/mk/modules.mk
$(TRACE) target/$(ADK_TARGET_ARCH)-kernel-configure
-for f in $(TARGETS);do if [ -f $$f ];then rm $$f;fi;done
$(CP) $(BUILD_DIR)/.kernelconfig $(LINUX_DIR)/mini.config
diff --git a/mk/kernel.mk b/mk/kernel.mk
index 97f944108..0bc29b217 100644
--- a/mk/kernel.mk
+++ b/mk/kernel.mk
@@ -1,7 +1,7 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
-include $(TOPDIR)/mk/kernel-ver.mk
+include $(ADK_TOPDIR)/mk/kernel-ver.mk
LINUX_KMOD_SUFFIX=ko
MODULES_SUBDIR := lib/modules/$(KERNEL_MOD_VERSION)
diff --git a/mk/package.mk b/mk/package.mk
index 3968ca60c..5ee7f7e54 100644
--- a/mk/package.mk
+++ b/mk/package.mk
@@ -62,7 +62,7 @@ _FAKE_COOKIE= ${WRKINST}/.fake_done
_IPKGS_COOKIE= ${STAGING_PKG_DIR}/stamps/${PKG_NAME}${PKG_VERSION}-${PKG_RELEASE}
_IN_PACKAGE:= 1
-include ${TOPDIR}/mk/buildhlp.mk
+include ${ADK_TOPDIR}/mk/buildhlp.mk
# defined in buildhlp.mk ('extract' can fail, use 'patch' then)
extract: ${_EXTRACT_COOKIE}
diff --git a/mk/vars.mk b/mk/vars.mk
index 67cbcc319..7f09a9c3a 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -12,7 +12,7 @@ BUILD_GROUP= $(shell id -gn)
ADK_SUFFIX:= _${ADK_TARGET_SYSTEM}_${ADK_TARGET_LIBC}
# some global dirs
-BASE_DIR:= $(TOPDIR)
+BASE_DIR:= $(ADK_TOPDIR)
ifeq ($(ADK_DL_DIR),)
DL_DIR?= $(BASE_DIR)/dl
else
@@ -287,4 +287,4 @@ ifeq ($(ADK_HOST_CYGWIN),y)
EXEEXT:= .exe
endif
-include $(TOPDIR)/mk/mirrors.mk
+include $(ADK_TOPDIR)/mk/mirrors.mk