update coreutils to latest stable version
[openadk.git] / mk / host-bottom.mk
blobcaba52f3e39b8dae2b3ecd55d8a0b64ed2f2f8ed
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}
6 hostpre-configure:
7 host-configure:
8 ${_HOST_CONFIGURE_COOKIE}: ${_HOST_PATCH_COOKIE}
9 @mkdir -p ${WRKBUILD}
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)
14 endif
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
19 endif
20 @cd ${WRKBUILD}; \
21 for i in $$(find . -name config.sub);do \
22 if [ -f $$i ]; then \
23 ${CP} ${SCRIPT_DIR}/config.sub $$i; \
24 fi; \
25 done; \
26 for i in $$(find . -name config.guess);do \
27 if [ -f $$i ]; then \
28 ${CP} ${SCRIPT_DIR}/config.guess $$i; \
29 fi; \
30 done;
31 @${MAKE} hostpre-configure $(MAKE_TRACE)
32 ifeq (${HOST_STYLE},)
33 cd ${WRKBUILD}; \
34 env ${HOST_CONFIGURE_ENV} \
35 ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
36 --program-prefix= \
37 --program-suffix= \
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 \
47 --disable-nls \
48 ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
49 endif
50 ifeq (${HOST_STYLE},auto)
51 cd ${WRKBUILD}; \
52 env ${HOST_CONFIGURE_ENV} \
53 ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
54 --program-prefix= \
55 --program-suffix= \
56 --prefix=/usr \
57 --bindir=/usr/bin \
58 --datadir=/usr/share \
59 --mandir=/usr/share/man \
60 --libdir=/usr/lib \
61 --libexecdir=/usr/libexec \
62 --localstatedir=/var \
63 --sysconfdir=/etc \
64 --disable-dependency-tracking \
65 --disable-libtool-lock \
66 --disable-nls \
67 ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
68 endif
69 ifeq (${HOST_STYLE},manual)
70 ${MAKE} host-configure $(MAKE_TRACE)
71 endif
72 ifeq (${HOST_STYLE},perl)
73 @$(CMD_TRACE) "configuring perl module... "
74 cd ${WRKBUILD}; \
75 PATH='${HOST_PATH}' \
76 PERL_MM_USE_DEFAULT=1 \
77 PERL_AUTOINSTALL=--skipdeps \
78 $(HOST_PERL_ENV) \
79 perl-host Makefile.PL ${HOST_CONFIGURE_ARGS}
80 endif
81 touch $@
83 host-build:
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)
89 endif
90 ${MAKE} host-build $(MAKE_TRACE)
91 touch $@
93 hostpost-install:
94 host-install: ${ALL_HOSTINST}
95 ${_HOST_FAKE_COOKIE}: ${_HOST_BUILD_COOKIE}
96 @$(CMD_TRACE) "host installing... "
97 @mkdir -p ${HOST_WRKINST}
98 ifeq (${HOST_STYLE},)
99 cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
100 DESTDIR='' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
101 endif
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)
105 endif
106 ifeq (${HOST_STYLE},manual)
107 env ${HOST_MAKE_ENV} ${MAKE} host-install $(MAKE_TRACE)
108 endif
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); \
115 done
116 @touch $@
118 ${_HOST_COOKIE}:
119 exec ${MAKE} hostpackage
121 ifeq ($(HOST_LINUX_ONLY),)
122 hostpackage: ${ALL_HOSTDIRS}
123 @touch ${_HOST_COOKIE}
124 endif
126 hostclean:
127 @$(CMD_TRACE) "cleaning... "
128 rm -rf ${WRKDIR} ${STAGING_PKG_DIR}/stamps/${PKG_NAME}\x01*-host