Browse Source

use HOST_BUILD_DIR to avoid rebuilding after make clean, add genext2fs to checks

Waldemar Brodkorb 11 years ago
parent
commit
e81e05c453
5 changed files with 11 additions and 5 deletions
  1. 1 1
      mk/build.mk
  2. 1 1
      mk/host.mk
  3. 1 3
      mk/pkg-bottom.mk
  4. 1 0
      mk/vars.mk
  5. 7 0
      scripts/scan-tools.sh

+ 1 - 1
mk/build.mk

@@ -146,7 +146,7 @@ ${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/M
 .PHONY: all world clean cleandir cleantoolchain distclean image_clean
 
 world:
-	mkdir -p $(DL_DIR) $(BUILD_DIR) $(TARGET_DIR) $(FW_DIR) \
+	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} ${TOPDIR}/scripts/update-sys

+ 1 - 1
mk/host.mk

@@ -3,7 +3,7 @@
 
 # This is where all package operation is done in
 ifneq (,$(findstring host,$(MAKECMDGOALS)))
-WRKDIR?=		${WRKDIR_BASE}/w-${PKG_NAME}-${PKG_VERSION}-${PKG_RELEASE}-host
+WRKDIR?=		${HOST_BUILD_DIR}/w-${PKG_NAME}-${PKG_VERSION}-${PKG_RELEASE}-host
 endif
 
 HOST_CONFIGURE_ENV+=	AUTOM4TE=${STAGING_HOST_DIR}/usr/bin/autom4te \

+ 1 - 3
mk/pkg-bottom.mk

@@ -125,8 +125,6 @@ do-install:
 post-install:
 spkg-install: ${ALL_POSTINST}
 ${_FAKE_COOKIE}: ${_BUILD_COOKIE}
-	echo FOO
-	echo $(HOST_WRKDIR)
 	@-rm -f ${_ALL_CONTROLS}
 	@mkdir -p '${STAGING_PKG_DIR}/stamps' ${WRKINST} '${STAGING_TARGET_DIR}/scripts'
 	@${MAKE} ${_ALL_CONTROLS} $(MAKE_TRACE)
@@ -186,7 +184,7 @@ ifneq (,$(filter dev,${PKG_OPTS}))
 	done
 endif
 	@-cd ${WRKINST}; \
-	    if [ "${PKG_NAME}" != "uClibc" -a "${PKG_NAME}" != "glibc" -a "${PKG_NAME}" != "libpthread" -a "${PKG_NAME}" != "libstdcxx" -a "${PKG_NAME}" != "libgcc" -a "${PKG_NAME}" != "libthread-db" -a "${PKG_NAME}" != "musl" -a "${PKG_NAME}" != "pam" ];then \
+	    if [ "${PKG_NAME}" != "uClibc" -a "${PKG_NAME}" != "glibc" -a "${PKG_NAME}" != "libpthread" -a "${PKG_NAME}" != "libstdcxx" -a "${PKG_NAME}" != "libgcc" -a "${PKG_NAME}" != "libthread-db" -a "${PKG_NAME}" != "musl" -a "${PKG_NAME}" != "pam" -a "${PKG_NAME}" != "tzdata" ];then \
 	    find lib \( -name lib\*.so\* -o -name lib\*.a \) \
 	    	-exec echo 'WARNING: ${PKG_NAME} installs files in /lib -' \
 		' fix this!' >&2 \; -quit 2>/dev/null; fi;\

+ 1 - 0
mk/vars.mk

@@ -20,6 +20,7 @@ endif
 SCRIPT_DIR:=		$(BASE_DIR)/scripts
 STAGING_HOST_DIR:=	${BASE_DIR}/host_${GNU_HOST_NAME}
 TOOLCHAIN_DIR:=		${BASE_DIR}/toolchain_${GNU_HOST_NAME}
+HOST_BUILD_DIR:=	${BASE_DIR}/host_build_${GNU_HOST_NAME}
 
 # dirs for cleandir
 FW_DIR_PFX:=		$(BASE_DIR)/firmware

+ 7 - 0
scripts/scan-tools.sh

@@ -273,6 +273,12 @@ if ! which ccache >/dev/null 2>&1; then
 	host_build_ccache=1
 fi
 
+host_build_genext2fs=0
+if ! which genext2fs >/dev/null 2>&1; then
+	echo "No genext2fs found, will build one when required."
+	host_build_genext2fs=1
+fi
+
 host_build_lzma=0
 if ! which lzma >/dev/null 2>&1; then
 	echo "No lzma found, will build one when required."
@@ -301,6 +307,7 @@ if [ $host_build_findutils -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_F
 if [ $host_build_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target/config/Config.in.prereq ;fi
 # optional
 if [ $host_build_ccache -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_CCACHE if ADK_HOST_NEED_CCACHE" >> $topdir/target/config/Config.in.prereq ;fi
+if [ $host_build_genext2fs -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_GENEXT2FS if ADK_HOST_NEED_GENEXT2FS" >> $topdir/target/config/Config.in.prereq ;fi
 if [ $host_build_lzma -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_LZMA if ADK_HOST_NEED_LZMA" >> $topdir/target/config/Config.in.prereq ;fi
 if [ $host_build_lzop -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_LZOP if ADK_HOST_NEED_LZOP" >> $topdir/target/config/Config.in.prereq ;fi