|
@@ -5,11 +5,11 @@
|
|
# that we can call it (BSD make has .if target(foo) but GNU not)
|
|
# that we can call it (BSD make has .if target(foo) but GNU not)
|
|
# and it won't error out.
|
|
# and it won't error out.
|
|
# * ${_foo_COOKIE} are the actual targets
|
|
# * ${_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
|
|
# * if you have a style -> define a pre-foo: and post-foo: if they
|
|
# are required, but the do-foo: magic is done here
|
|
# 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:
|
|
pre-configure:
|
|
do-configure:
|
|
do-configure:
|
|
@@ -18,21 +18,42 @@ ${_CONFIGURE_COOKIE}: ${_PATCH_COOKIE}
|
|
mkdir -p ${WRKBUILD}
|
|
mkdir -p ${WRKBUILD}
|
|
@${MAKE} pre-configure $(MAKE_TRACE)
|
|
@${MAKE} pre-configure $(MAKE_TRACE)
|
|
|
|
|
|
-ifneq ($(filter autogen,${CONFIGURE_STYLE}),)
|
|
+ifneq ($(filter autogen,${AUTOTOOL_STYLE}),)
|
|
cd ${WRKBUILD}; \
|
|
cd ${WRKBUILD}; \
|
|
./autogen.sh $(MAKE_TRACE)
|
|
./autogen.sh $(MAKE_TRACE)
|
|
endif
|
|
endif
|
|
-ifneq ($(filter autotool,${CONFIGURE_STYLE}),)
|
|
+ifneq ($(filter autotool,${AUTOTOOL_STYLE}),)
|
|
cd ${WRKBUILD}; \
|
|
cd ${WRKBUILD}; \
|
|
env AUTOCONF_VERSION=2.62 \
|
|
env AUTOCONF_VERSION=2.62 \
|
|
AUTOMAKE_VERSION=1.9 \
|
|
AUTOMAKE_VERSION=1.9 \
|
|
autoreconf -vif $(MAKE_TRACE)
|
|
autoreconf -vif $(MAKE_TRACE)
|
|
endif
|
|
endif
|
|
-ifneq ($(filter autoconf,${CONFIGURE_STYLE}),)
|
|
+ifneq ($(filter autoconf,${AUTOTOOL_STYLE}),)
|
|
cd ${WRKBUILD}; \
|
|
cd ${WRKBUILD}; \
|
|
env AUTOCONF_VERSION=2.62 autoconf $(MAKE_TRACE)
|
|
env AUTOCONF_VERSION=2.62 autoconf $(MAKE_TRACE)
|
|
endif
|
|
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... "
|
|
@$(CMD_TRACE) "configuring... "
|
|
@cd ${WRKBUILD}; \
|
|
@cd ${WRKBUILD}; \
|
|
for i in $$(find . -name config.sub);do \
|
|
for i in $$(find . -name config.sub);do \
|
|
@@ -49,7 +70,7 @@ ifneq ($(filter gnu,${CONFIGURE_STYLE}),)
|
|
done;
|
|
done;
|
|
cd ${WRKBUILD}; rm -f config.{cache,status}; \
|
|
cd ${WRKBUILD}; rm -f config.{cache,status}; \
|
|
env ${CONFIGURE_ENV} \
|
|
env ${CONFIGURE_ENV} \
|
|
- ${BASH} ${WRKSRC}/configure \
|
|
+ ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
|
|
--build=${GNU_HOST_NAME} \
|
|
--build=${GNU_HOST_NAME} \
|
|
--host=${GNU_TARGET_NAME} \
|
|
--host=${GNU_TARGET_NAME} \
|
|
--target=${GNU_TARGET_NAME} \
|
|
--target=${GNU_TARGET_NAME} \
|
|
@@ -67,10 +88,8 @@ ifneq ($(filter gnu,${CONFIGURE_STYLE}),)
|
|
--disable-dependency-tracking \
|
|
--disable-dependency-tracking \
|
|
--disable-libtool-lock \
|
|
--disable-libtool-lock \
|
|
${CONFIGURE_ARGS} $(MAKE_TRACE)
|
|
${CONFIGURE_ARGS} $(MAKE_TRACE)
|
|
-else ifeq ($(filter-out manual,${CONFIGURE_STYLE}),)
|
|
|
|
- env ${CONFIGURE_ENV} ${MAKE} do-configure $(MAKE_TRACE)
|
|
|
|
else
|
|
else
|
|
- @echo "Invalid CONFIGURE_STYLE '${CONFIGURE_STYLE}'" >&2
|
|
+ @echo "Invalid CONFIG_STYLE '${CONFIG_STYLE}'" >&2
|
|
@exit 1
|
|
@exit 1
|
|
endif
|
|
endif
|
|
@${MAKE} post-configure $(MAKE_TRACE)
|
|
@${MAKE} post-configure $(MAKE_TRACE)
|
|
@@ -89,13 +108,12 @@ post-build:
|
|
${_BUILD_COOKIE}: ${_CONFIGURE_COOKIE}
|
|
${_BUILD_COOKIE}: ${_CONFIGURE_COOKIE}
|
|
@env ${MAKE_ENV} ${MAKE} pre-build $(MAKE_TRACE)
|
|
@env ${MAKE_ENV} ${MAKE} pre-build $(MAKE_TRACE)
|
|
@$(CMD_TRACE) "compiling... "
|
|
@$(CMD_TRACE) "compiling... "
|
|
-ifneq ($(filter auto,${BUILD_STYLE}),)
|
|
+
|
|
- cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
|
|
+ifneq ($(filter manual,${BUILD_STYLE}),)
|
|
- ${MAKE_FLAGS} ${ALL_TARGET} $(MAKE_TRACE)
|
|
|
|
-else ifneq ($(filter manual,${BUILD_STYLE}),)
|
|
|
|
env ${MAKE_ENV} ${MAKE} do-build $(MAKE_TRACE)
|
|
env ${MAKE_ENV} ${MAKE} do-build $(MAKE_TRACE)
|
|
else ifeq ($(strip ${BUILD_STYLE}),)
|
|
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
|
|
else
|
|
@echo "Invalid BUILD_STYLE '${BUILD_STYLE}'" >&2
|
|
@echo "Invalid BUILD_STYLE '${BUILD_STYLE}'" >&2
|
|
@exit 1
|
|
@exit 1
|
|
@@ -109,15 +127,15 @@ post-install:
|
|
${_FAKE_COOKIE}: ${_BUILD_COOKIE}
|
|
${_FAKE_COOKIE}: ${_BUILD_COOKIE}
|
|
-rm -f ${_ALL_CONTROLS}
|
|
-rm -f ${_ALL_CONTROLS}
|
|
@mkdir -p '${STAGING_PARENT}/pkg' ${WRKINST} '${STAGING_DIR}/scripts'
|
|
@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)
|
|
@${MAKE} ${_ALL_CONTROLS} $(MAKE_TRACE)
|
|
@env ${MAKE_ENV} ${MAKE} pre-install $(MAKE_TRACE)
|
|
@env ${MAKE_ENV} ${MAKE} pre-install $(MAKE_TRACE)
|
|
-ifneq ($(filter auto,${INSTALL_STYLE}),)
|
|
+ifneq ($(filter manual,${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}),)
|
|
|
|
env ${MAKE_ENV} ${MAKE} do-install $(MAKE_TRACE)
|
|
env ${MAKE_ENV} ${MAKE} do-install $(MAKE_TRACE)
|
|
else ifeq ($(strip ${INSTALL_STYLE}),)
|
|
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
|
|
else
|
|
@echo "Invalid INSTALL_STYLE '${INSTALL_STYLE}'" >&2
|
|
@echo "Invalid INSTALL_STYLE '${INSTALL_STYLE}'" >&2
|
|
@exit 1
|
|
@exit 1
|