Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Apr 2000 19:06:49 -0300
From:      lioux@uol.com.br
To:        freebsd-ports@freebsd.org
Subject:   More CONFIGURE_{blabla} options proposal for .mk
Message-ID:  <20000429190649.A30180@Fedaykin.here>

next in thread | raw e-mail | index | archive | help
Dear Ports,
(specially Mr. Satoshi)

	I am thereby submitting some bsd.port.mk options.
I hope the options are self-explanatory.
	However, in the event they are not, here goes some usage
examples:

CONFIGURE_WRKSRC - configure has to be run from inside
		${WRKSRC}/objdir instead of ${WRKSRC}
CONFIGURE_PATH - even though it has to be run inside
		${CONFIGURE_WRKSRC}, configure has to be run as
		../configure (changing ${CONFIGURE_SCRIPT} to
		accomplish the same result is not semantically
		correct and sometimes this is not
		possible anyway) :)
CONFIGURE_BEFORE_SCRIPT - well, this little stranger needs to be
		called by /bin/sh or something else (sudo, who
		knows).
CONFIGURE_BEFORE_SCRIPT_ARGS - well, the aforementioned needs
		some arguments. It could be included inside
		the aforementioned but, then, my sanity checks
		would not apply. Besides, it follows .mk pattern.

	Most, if not all, of the aforementioned can be acomplished
through appropriate patching but this is cleaner and easier to
understand and maintain. At least, that is my hope. I have a few
port submitions just awaiting this. :)

	Regards,
		Mario Ferreira

-- patch

--- /tmp/bsd.port.mk.ORIG	Thu Apr 27 00:04:53 2000
+++ /tmp/bsd.port.mk	Sat Apr 29 18:24:17 2000
@@ -368,6 +368,21 @@
 #				  configure stage will not do anything if this is not set.
 # GNU_CONFIGURE	- Set if you are using GNU configure (optional).  Implies
 #				  HAS_CONFIGURE.
+# CONFIGURE_BEFORE_SCRIPT -	  An executable command to prefix to either call the
+#				  configure script or perform some privilege gaining
+#				  tasks. Can be a shell command processor to call it
+#				  for instance (e.g., /bin/sh configure)
+#				  (default: empty if not otherwise set)
+# CONFIGURE_BEFORE_SCRIPT_ARGS -
+#				  Arguments to ${CONFIGURE_BEFORE_SCRIPT} before
+#				  ${CONFIGURE_SCRIPT} filename.
+#				  (default: empty, specially if CONFIGURE_BEFORE_SCRIPT
+#				  is not set)
+# CONFIGURE_WRKSRC - A subdirectory of ${WRKDIR} where to the configure target cd
+#				  before calling ${CONFIGURE_PATH}/${CONFIGURE_SCRIPT}
+#				  (default: ${WRKSRC})
+# CONFIGURE_PATH - Pathname appended before configure script filename,
+#				  usually relative to ${CONFIGURE_WRKSRC} (default: .)
 # CONFIGURE_SCRIPT - Name of configure script (defaults: configure).
 # CONFIGURE_TARGET - The name of target to call when GNU_CONFIGURE is
 #				  defined (default: ${MACHINE_ARCH}--freebsd${OSREL}).
@@ -1202,6 +1217,14 @@
 .endif
 PKGLATESTFILE?=		${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_SUFX}
 
+CONFIGURE_BEFORE_SCRIPT!= test -x ${CONFIGURE_BEFORE_SCRIPT} && echo ${CONFIGURE_BEFORE_SCRIPT} || echo ""
+.if defined(CONFIGURE_BEFORE_SCRIPT_ARGS)
+.if empty(CONFIGURE_BEFORE_SCRIPT)
+CONFIGURE_BEFORE_SCRIPT_ARGS= 
+.endif
+.endif
+CONFIGURE_WRKSRC?=	${WRKSRC}
+CONFIGURE_PATH?=	.
 CONFIGURE_SCRIPT?=	configure
 CONFIGURE_TARGET?=	${MACHINE_ARCH}--freebsd${OSREL}
 CONFIGURE_LOG?=		config.log
@@ -1709,14 +1732,14 @@
 		  ${SCRIPTDIR}/configure; \
 	fi
 .if defined(HAS_CONFIGURE)
-	@(cd ${WRKSRC} && \
+	@(cd ${CONFIGURE_WRKSRC} && \
 		if ! ${SETENV} CC="${CC}" CXX="${CXX}" \
 	    CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
 	    INSTALL="/usr/bin/install -c -o ${BINOWN} -g ${BINGRP}" \
 	    INSTALL_DATA="${INSTALL_DATA}" \
 	    INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
 	    INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
-	    ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}; then \
+	    ${CONFIGURE_ENV} ${CONFIGURE_BEFORE_SCRIPT} ${CONFIGURE_BEFORE_SCRIPT_ARGS} ${CONFIGURE_PATH}/${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}; then \
 			${ECHO} "===>  Script \"${CONFIGURE_SCRIPT}\" failed: here are the contents of \"${CONFIGURE_LOG}\""; \
 			${CAT} ${CONFIGURE_LOG}; \
 			${ECHO} "(end of \"${CONFIGURE_LOG}\")"; \


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000429190649.A30180>