From 6daa792eab1488d013fefc5eb7e4d01f40f38687 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 7 Feb 2010 20:03:20 +0100 Subject: change defaults for CONFIG/BUILD/INSTALL styles All packages need an update, so here is a very huge commit. Most of the 460 source packages use automatic style for configuration, building and installing. Make these styles default to "auto". If you have a package, which does not conform to this, just use manual style and add a do-$task make target. I added a new style named AUTOTOOL style, which is needed for some broken packages, which needs to be updated via autoconf or automake. I renamed CONFIGURE_STYLE to CONFIG_STYLE. Updates for some packages, which have newer upstream versions. Renaming of all package/*/extra directories. Use the directory src/ to provide overwrites of source files or to add the code, when no upstream package is available or used. src directory will be automatically used. --- mk/pkg-bottom.mk | 60 ++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 21 deletions(-) (limited to 'mk/pkg-bottom.mk') 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 -- cgit v1.2.3