grub: add part_dvh for mips/arc
[openadk.git] / mk / host-bottom.mk
blob6fcd78e8846bd60db3a56543f4ba9a5c165d773c
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 ifneq (,$(filter autogen,${AUTOTOOL_STYLE}))
11 @$(CMD_TRACE) "autotooling.. "
12 @cd ${WRKSRC}; env ${HOST_AUTOTOOL_ENV} $(BASH) autogen.sh $(MAKE_TRACE)
13 endif
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
18 endif
19 @${MAKE} hostpre-configure $(MAKE_TRACE)
20 ifeq (${HOST_STYLE},)
21 @$(CMD_TRACE) "configuring.. "
22 cd ${WRKBUILD}; \
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)
33 endif
34 ifeq (${HOST_STYLE},auto)
35 @$(CMD_TRACE) "configuring.. "
36 cd ${WRKBUILD}; \
37 env ${HOST_CONFIGURE_ENV} \
38 ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
39 --program-prefix= \
40 --program-suffix= \
41 --prefix=/usr \
42 --bindir=/usr/bin \
43 --datadir=/usr/share \
44 --mandir=/usr/share/man \
45 --libdir=/usr/lib \
46 --libexecdir=/usr/libexec \
47 --localstatedir=/var \
48 --sysconfdir=/etc \
49 --disable-dependency-tracking \
50 --disable-libtool-lock \
51 --disable-nls \
52 ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
53 endif
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)
59 endif
60 ifeq (${HOST_STYLE},perl)
61 @$(CMD_TRACE) "configuring perl module.. "
62 cd ${WRKBUILD}; \
63 PATH='${HOST_PATH}' \
64 PERL_MM_USE_DEFAULT=1 \
65 PERL_AUTOINSTALL=--skipdeps \
66 $(HOST_PERL_ENV) \
67 perl-host Makefile.PL ${HOST_CONFIGURE_ARGS}
68 endif
69 ifeq (${HOST_STYLE},manual)
70 @$(CMD_TRACE) "configuring.. "
71 ${MAKE} host-configure $(MAKE_TRACE)
72 endif
73 touch $@
75 host-build:
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)
81 endif
82 ${MAKE} host-build $(MAKE_TRACE)
83 touch $@
85 hostpost-install:
86 host-install: ${ALL_HOSTINST}
87 ${_HOST_FAKE_COOKIE}: ${_HOST_BUILD_COOKIE}
88 @$(CMD_TRACE) "installing.. "
89 @mkdir -p ${HOST_WRKINST}
90 ifeq (${HOST_STYLE},)
91 cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
92 DESTDIR='' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
93 endif
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)
97 endif
98 ifeq (${HOST_STYLE},manual)
99 env ${HOST_MAKE_ENV} ${MAKE} host-install $(MAKE_TRACE)
100 endif
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); \
107 done
108 touch $@
110 ${_HOST_COOKIE}:
111 exec ${MAKE} hostpackage
113 ifeq ($(HOST_LINUX_ONLY),)
114 hostpackage: ${ALL_HOSTDIRS}
115 @touch ${_HOST_COOKIE}
116 endif
118 hostclean:
119 @printf " ---> cleaning host package build directories and files.. "
120 -rm -rf ${STAGING_PKG_DIR}/stamps/${PKG_NAME}*-host ${WRKDIR}
121 @printf " done\n"