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 --libdir=${STAGING_HOST_DIR}/usr
/lib \
43 --libexecdir
=${STAGING_HOST_DIR}/usr
/libexec \
44 --sysconfdir
=${STAGING_HOST_DIR}/etc \
45 --disable-dependency-tracking \
46 --disable-libtool-lock \
48 ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE
)
50 ifeq (${HOST_STYLE},auto
)
52 env
${HOST_CONFIGURE_ENV} \
53 ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
58 --datadir=/usr
/share \
59 --mandir=/usr
/share
/man \
61 --libexecdir
=/usr
/libexec \
62 --localstatedir
=/var \
64 --disable-dependency-tracking \
65 --disable-libtool-lock \
67 ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE
)
69 ifeq (${HOST_STYLE},manual
)
70 ${MAKE} host-configure
$(MAKE_TRACE
)
72 ifeq (${HOST_STYLE},perl
)
73 @
$(CMD_TRACE
) "configuring perl module... "
76 PERL_MM_USE_DEFAULT
=1 \
77 PERL_AUTOINSTALL
=--skipdeps \
79 perl-host Makefile.PL
${HOST_CONFIGURE_ARGS}
84 ${_HOST_BUILD_COOKIE}: ${_HOST_CONFIGURE_COOKIE}
85 ifneq (${HOST_STYLE},manual
)
86 @
$(CMD_TRACE
) "host compiling... "
87 cd
${WRKBUILD} && env
${HOST_MAKE_ENV} ${MAKE} -f
${MAKE_FILE} \
88 ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE
)
90 ${MAKE} host-build
$(MAKE_TRACE
)
94 host-install
: ${ALL_HOSTINST}
95 ${_HOST_FAKE_COOKIE}: ${_HOST_BUILD_COOKIE}
96 @
$(CMD_TRACE
) "host installing... "
97 @mkdir
-p
${HOST_WRKINST}
99 cd
${WRKBUILD} && env
${HOST_MAKE_ENV} ${MAKE} -f
${MAKE_FILE} \
100 DESTDIR
='' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE
)
102 ifeq (${HOST_STYLE},auto
)
103 cd
${WRKBUILD} && env
${HOST_MAKE_ENV} ${MAKE} -f
${MAKE_FILE} \
104 DESTDIR
='${STAGING_HOST_DIR}' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE
)
106 ifeq (${HOST_STYLE},manual
)
107 env
${HOST_MAKE_ENV} ${MAKE} host-install
$(MAKE_TRACE
)
109 env
${HOST_MAKE_ENV} ${MAKE} hostpost-install
$(MAKE_TRACE
)
110 @find
$(STAGING_HOST_DIR
) -name \
*.la
-exec
rm {} \
;
111 @for a in
$(STAGING_HOST_DIR
)/usr
/bin
/*-config
; do \
112 [[ -e
$$a ]] || continue
; \
113 $(SED
) "s,^prefix=.*,prefix=$(STAGING_HOST_DIR)/usr," $$a; \
114 chmod u
+x
$(STAGING_HOST_DIR
)/usr
/bin
/$$(basename $$a); \
119 exec
${MAKE} hostpackage
121 ifeq ($(HOST_LINUX_ONLY
),)
122 hostpackage
: ${ALL_HOSTDIRS}
123 @touch
${_HOST_COOKIE}
127 @
$(CMD_TRACE
) "cleaning... "
128 rm -rf
${WRKDIR} ${STAGING_PKG_DIR}/stamps
/${PKG_NAME}\x01*-host