diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-02-07 20:15:44 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-02-07 20:15:44 +0100 |
commit | 483e9fde0b3923169c3c70720ca94b032dd30ae8 (patch) | |
tree | bd4ea28db271093276fe295b2da2e000a28aa857 /mk/pkg-bottom.mk | |
parent | 10997d993a55465525b026b9404f5809687e9e3c (diff) | |
parent | 25448b89bc693d56b074cd7b2a9c60ddc12f7404 (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'mk/pkg-bottom.mk')
-rw-r--r-- | mk/pkg-bottom.mk | 60 |
1 files changed, 39 insertions, 21 deletions
diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk index 0dc830b28..e136392d7 100644 --- a/mk/pkg-bottom.mk +++ b/mk/pkg-bottom.mk @@ -5,11 +5,11 @@ # that we can call it (BSD make has .if target(foo) but GNU not) # and it won't error out. # * ${_foo_COOKIE} are the actual targets -# * default is "manual" -> define a do-foo: target in the Makefile +# * default is "auto" +# * define "manual" if you need your own method +# -> define a do-foo: target in the Makefile # * if you have a style -> define a pre-foo: and post-foo: if they # are required, but the do-foo: magic is done here -# * we want to use styles (configure:gnu, build/install:auto), for -# making the Makefiles of the packages more clear pre-configure: do-configure: @@ -18,21 +18,42 @@ ${_CONFIGURE_COOKIE}: ${_PATCH_COOKIE} mkdir -p ${WRKBUILD} @${MAKE} pre-configure $(MAKE_TRACE) -ifneq ($(filter autogen,${CONFIGURE_STYLE}),) +ifneq ($(filter autogen,${AUTOTOOL_STYLE}),) cd ${WRKBUILD}; \ ./autogen.sh $(MAKE_TRACE) endif -ifneq ($(filter autotool,${CONFIGURE_STYLE}),) +ifneq ($(filter autotool,${AUTOTOOL_STYLE}),) cd ${WRKBUILD}; \ env AUTOCONF_VERSION=2.62 \ AUTOMAKE_VERSION=1.9 \ autoreconf -vif $(MAKE_TRACE) endif -ifneq ($(filter autoconf,${CONFIGURE_STYLE}),) +ifneq ($(filter autoconf,${AUTOTOOL_STYLE}),) cd ${WRKBUILD}; \ env AUTOCONF_VERSION=2.62 autoconf $(MAKE_TRACE) endif -ifneq ($(filter gnu,${CONFIGURE_STYLE}),) +ifneq ($(filter manual,${CONFIG_STYLE}),) + env ${CONFIGURE_ENV} ${MAKE} do-configure $(MAKE_TRACE) +else ifneq ($(filter minimal,${CONFIG_STYLE}),) + @$(CMD_TRACE) "configuring... " + @cd ${WRKBUILD}; \ + for i in $$(find . -name config.sub);do \ + if [ -f $$i ]; then \ + ${CP} $$i $$i.bak; \ + ${CP} ${SCRIPT_DIR}/config.sub $$i; \ + fi; \ + done; \ + for i in $$(find . -name config.guess);do \ + if [ -f $$i ]; then \ + ${CP} $$i $$i.bak; \ + ${CP} ${SCRIPT_DIR}/config.guess $$i; \ + fi; \ + done; + cd ${WRKBUILD}; rm -f config.{cache,status}; \ + env ${CONFIGURE_ENV} \ + ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \ + ${CONFIGURE_ARGS} $(MAKE_TRACE) +else ifeq ($(strip ${CONFIG_STYLE}),) @$(CMD_TRACE) "configuring... " @cd ${WRKBUILD}; \ for i in $$(find . -name config.sub);do \ @@ -49,7 +70,7 @@ ifneq ($(filter gnu,${CONFIGURE_STYLE}),) done; cd ${WRKBUILD}; rm -f config.{cache,status}; \ env ${CONFIGURE_ENV} \ - ${BASH} ${WRKSRC}/configure \ + ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \ --build=${GNU_HOST_NAME} \ --host=${GNU_TARGET_NAME} \ --target=${GNU_TARGET_NAME} \ @@ -67,10 +88,8 @@ ifneq ($(filter gnu,${CONFIGURE_STYLE}),) --disable-dependency-tracking \ --disable-libtool-lock \ ${CONFIGURE_ARGS} $(MAKE_TRACE) -else ifeq ($(filter-out manual,${CONFIGURE_STYLE}),) - env ${CONFIGURE_ENV} ${MAKE} do-configure $(MAKE_TRACE) else - @echo "Invalid CONFIGURE_STYLE '${CONFIGURE_STYLE}'" >&2 + @echo "Invalid CONFIG_STYLE '${CONFIG_STYLE}'" >&2 @exit 1 endif @${MAKE} post-configure $(MAKE_TRACE) @@ -89,13 +108,12 @@ post-build: ${_BUILD_COOKIE}: ${_CONFIGURE_COOKIE} @env ${MAKE_ENV} ${MAKE} pre-build $(MAKE_TRACE) @$(CMD_TRACE) "compiling... " -ifneq ($(filter auto,${BUILD_STYLE}),) - cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ - ${MAKE_FLAGS} ${ALL_TARGET} $(MAKE_TRACE) -else ifneq ($(filter manual,${BUILD_STYLE}),) + +ifneq ($(filter manual,${BUILD_STYLE}),) env ${MAKE_ENV} ${MAKE} do-build $(MAKE_TRACE) else ifeq ($(strip ${BUILD_STYLE}),) - env ${MAKE_ENV} ${MAKE} do-build $(MAKE_TRACE) + cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ + ${MAKE_FLAGS} ${ALL_TARGET} $(MAKE_TRACE) else @echo "Invalid BUILD_STYLE '${BUILD_STYLE}'" >&2 @exit 1 @@ -109,15 +127,15 @@ post-install: ${_FAKE_COOKIE}: ${_BUILD_COOKIE} -rm -f ${_ALL_CONTROLS} @mkdir -p '${STAGING_PARENT}/pkg' ${WRKINST} '${STAGING_DIR}/scripts' + @mkdir -p ${WRKINST}/{sbin,bin,etc,lib} + @mkdir -p ${WRKINST}/usr/{sbin,bin,etc,lib} @${MAKE} ${_ALL_CONTROLS} $(MAKE_TRACE) @env ${MAKE_ENV} ${MAKE} pre-install $(MAKE_TRACE) -ifneq ($(filter auto,${INSTALL_STYLE}),) - cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ - DESTDIR='${WRKINST}' ${FAKE_FLAGS} ${INSTALL_TARGET} $(MAKE_TRACE) -else ifneq ($(filter manual,${INSTALL_STYLE}),) +ifneq ($(filter manual,${INSTALL_STYLE}),) env ${MAKE_ENV} ${MAKE} do-install $(MAKE_TRACE) else ifeq ($(strip ${INSTALL_STYLE}),) - env ${MAKE_ENV} ${MAKE} do-install $(MAKE_TRACE) + cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ + DESTDIR='${WRKINST}' ${FAKE_FLAGS} ${INSTALL_TARGET} $(MAKE_TRACE) else @echo "Invalid INSTALL_STYLE '${INSTALL_STYLE}'" >&2 @exit 1 |