1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 host-extract
: ${_HOST_PATCH_COOKIE}
8 ${_HOST_CONFIGURE_COOKIE}: ${_HOST_PATCH_COOKIE}
10 ifneq (,$(filter autogen
,${AUTOTOOL_STYLE}))
11 @
$(CMD_TRACE
) "autotooling.. "
12 @cd
${WRKSRC}; env
${HOST_AUTOTOOL_ENV} $(BASH
) autogen.sh
$(MAKE_TRACE
)
14 ifneq (,$(filter autoreconf
,${AUTOTOOL_STYLE}))
15 cd
${WRKSRC}; env
${HOST_AUTOTOOL_ENV} autoreconf
-vif
$(MAKE_TRACE
)
16 @
rm -rf
${WRKSRC}/autom4te.cache
17 @touch
${WRKDIR}/.autoreconf_done
19 @
${MAKE} hostpre-configure
$(MAKE_TRACE
)
21 @
$(CMD_TRACE
) "configuring.. "
23 env
${HOST_CONFIGURE_ENV} \
24 ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
25 --prefix=${STAGING_HOST_DIR}/usr \
26 --bindir=${STAGING_HOST_DIR}/usr
/bin \
27 --datadir=${STAGING_HOST_DIR}/usr
/share \
28 --mandir=${STAGING_HOST_DIR}/usr
/share
/man \
29 --libdir=${STAGING_HOST_DIR}/usr
/lib \
30 --libexecdir
=${STAGING_HOST_DIR}/usr
/libexec \
31 --sysconfdir
=${STAGING_HOST_DIR}/etc \
32 ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE
)
34 ifeq (${HOST_STYLE},auto
)
35 @
$(CMD_TRACE
) "configuring.. "
37 env
${HOST_CONFIGURE_ENV} \
38 ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
43 --datadir=/usr
/share \
44 --mandir=/usr
/share
/man \
46 --libexecdir
=/usr
/libexec \
47 --localstatedir
=/var \
49 --disable-dependency-tracking \
50 --disable-libtool-lock \
52 ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE
)
54 ifeq (${HOST_STYLE},cmake
)
55 @
$(CMD_TRACE
) "configuring cmake.. "
56 cd
${WRKBUILD}; PATH
='${HOST_PATH}' \
57 cmake
-Wno-dev
-DCMAKE_INSTALL_PREFIX
:PATH
=/usr \
58 ${HOST_CMAKE_FLAGS} ${WRKSRC} $(MAKE_TRACE
)
60 ifeq (${HOST_STYLE},perl
)
61 @
$(CMD_TRACE
) "configuring perl module.. "
64 PERL_MM_USE_DEFAULT
=1 \
65 PERL_AUTOINSTALL
=--skipdeps \
67 perl-host Makefile.PL
${HOST_CONFIGURE_ARGS}
69 ifeq (${HOST_STYLE},manual
)
70 @
$(CMD_TRACE
) "configuring.. "
71 ${MAKE} host-configure
$(MAKE_TRACE
)
76 ${_HOST_BUILD_COOKIE}: ${_HOST_CONFIGURE_COOKIE}
77 @
$(CMD_TRACE
) "compiling.. "
78 ifneq (${HOST_STYLE},manual
)
79 cd
${WRKBUILD} && env
${HOST_MAKE_ENV} ${MAKE} -f
${MAKE_FILE} \
80 ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE
)
82 ${MAKE} host-build
$(MAKE_TRACE
)
86 host-install
: ${ALL_HOSTINST}
87 ${_HOST_FAKE_COOKIE}: ${_HOST_BUILD_COOKIE}
88 @
$(CMD_TRACE
) "installing.. "
89 @mkdir
-p
${HOST_WRKINST}
91 cd
${WRKBUILD} && env
${HOST_MAKE_ENV} ${MAKE} -f
${MAKE_FILE} \
92 DESTDIR
='' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE
)
94 ifeq (${HOST_STYLE},auto
)
95 cd
${WRKBUILD} && env
${HOST_MAKE_ENV} ${MAKE} -f
${MAKE_FILE} \
96 DESTDIR
='${STAGING_HOST_DIR}' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE
)
98 ifeq (${HOST_STYLE},manual
)
99 env
${HOST_MAKE_ENV} ${MAKE} host-install
$(MAKE_TRACE
)
101 env
${HOST_MAKE_ENV} ${MAKE} hostpost-install
$(MAKE_TRACE
)
102 @find
$(STAGING_HOST_DIR
) -name \
*.la
-exec
rm {} \
;
103 @for a in
$(STAGING_HOST_DIR
)/usr
/bin
/*-config
; do \
104 [[ -e
$$a ]] || continue
; \
105 $(SED
) "s,^prefix=.*,prefix=$(STAGING_HOST_DIR)/usr," $$a; \
106 chmod u
+x
$(STAGING_HOST_DIR
)/usr
/bin
/$$(basename $$a); \
111 exec
${MAKE} hostpackage
113 ifeq ($(HOST_LINUX_ONLY
),)
114 hostpackage
: ${ALL_HOSTDIRS}
115 @touch
${_HOST_COOKIE}
119 @printf
" ---> cleaning host package build directories and files.. "
120 -rm -rf
${STAGING_PKG_DIR}/stamps
/${PKG_NAME}*-host
${WRKDIR}