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 @
$(CMD_TRACE
) "host configuring... "
11 ifneq (,$(filter autogen
,${AUTOTOOL_STYLE}))
12 @
$(CMD_TRACE
) "autotool configuring... "
13 @cd
${WRKSRC}; env
${AUTOTOOL_ENV} $(BASH
) autogen.sh
$(MAKE_TRACE
)
15 ifneq (,$(filter autoreconf
,${AUTOTOOL_STYLE}))
16 cd
${WRKSRC}; env
${AUTOTOOL_ENV} autoreconf
-if
$(MAKE_TRACE
)
17 @
rm -rf
${WRKSRC}/autom4te.cache
18 @touch
${WRKDIR}/.autoreconf_done
21 for i in
$$(find .
-name config.sub
);do \
23 ${CP} ${SCRIPT_DIR}/config.sub
$$i; \
26 for i in
$$(find .
-name config.guess
);do \
28 ${CP} ${SCRIPT_DIR}/config.guess
$$i; \
31 @
${MAKE} hostpre-configure
$(MAKE_TRACE
)
34 env
${HOST_CONFIGURE_ENV} \
35 ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
38 --prefix=${STAGING_HOST_DIR}/usr \
39 --bindir=${STAGING_HOST_DIR}/usr
/bin \
40 --datadir=${STAGING_HOST_DIR}/usr
/share \
41 --mandir=${STAGING_HOST_DIR}/usr
/share
/man \
42 --libexecdir
=${STAGING_HOST_DIR}/usr
/libexec \
43 --sysconfdir
=${STAGING_HOST_DIR}/etc \
44 --disable-dependency-tracking \
45 --disable-libtool-lock \
47 ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE
)
49 ifeq (${HOST_STYLE},auto
)
51 env
${HOST_CONFIGURE_ENV} \
52 ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
57 --datadir=/usr
/share \
58 --mandir=/usr
/share
/man \
59 --libexecdir
=/usr
/libexec \
60 --localstatedir
=/var \
62 --disable-dependency-tracking \
63 --disable-libtool-lock \
65 ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE
)
67 ifeq (${HOST_STYLE},manual
)
68 ${MAKE} host-configure
$(MAKE_TRACE
)
70 ifeq (${HOST_STYLE},perl
)
71 @
$(CMD_TRACE
) "configuring perl module... "
74 PERL_MM_USE_DEFAULT
=1 \
75 PERL_AUTOINSTALL
=--skipdeps \
77 perl-host Makefile.PL
${HOST_CONFIGURE_ARGS}
82 ${_HOST_BUILD_COOKIE}: ${_HOST_CONFIGURE_COOKIE}
83 ifneq (${HOST_STYLE},manual
)
84 @
$(CMD_TRACE
) "host compiling... "
85 cd
${WRKBUILD} && env
${HOST_MAKE_ENV} ${MAKE} -f
${MAKE_FILE} \
86 ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE
)
88 ${MAKE} host-build
$(MAKE_TRACE
)
92 host-install
: ${ALL_HOSTINST}
93 ${_HOST_FAKE_COOKIE}: ${_HOST_BUILD_COOKIE}
94 @
$(CMD_TRACE
) "host installing... "
95 @mkdir
-p
${HOST_WRKINST}
97 cd
${WRKBUILD} && env
${HOST_MAKE_ENV} ${MAKE} -f
${MAKE_FILE} \
98 DESTDIR
='' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE
)
100 ifeq (${HOST_STYLE},auto
)
101 cd
${WRKBUILD} && env
${HOST_MAKE_ENV} ${MAKE} -f
${MAKE_FILE} \
102 DESTDIR
='${STAGING_HOST_DIR}' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE
)
104 ifeq (${HOST_STYLE},manual
)
105 env
${HOST_MAKE_ENV} ${MAKE} host-install
$(MAKE_TRACE
)
107 env
${HOST_MAKE_ENV} ${MAKE} hostpost-install
$(MAKE_TRACE
)
108 @find
$(STAGING_HOST_DIR
) -name \
*.la
-exec
rm {} \
;
109 @for a in
$(STAGING_HOST_DIR
)/usr
/bin
/*-config
; do \
110 [[ -e
$$a ]] || continue
; \
111 $(SED
) "s,^prefix=.*,prefix=$(STAGING_HOST_DIR)/usr," $$a; \
112 chmod u
+x
$(STAGING_HOST_DIR
)/usr
/bin
/$$(basename $$a); \
117 exec
${MAKE} hostpackage
119 ifeq ($(HOST_LINUX_ONLY
),)
120 hostpackage
: ${ALL_HOSTDIRS}
121 @touch
${_HOST_COOKIE}
125 @
$(CMD_TRACE
) "cleaning... "
126 rm -rf
${WRKDIR} ${STAGING_PKG_DIR}/stamps
/${PKG_NAME}\x01*-host