tweak in bsd.port.mk wrt FAKE_FLAGS

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

tweak in bsd.port.mk wrt FAKE_FLAGS

Marc Espie-2
Having played with 100s of ports now, I believe that the following tweak
will simplify things:

instead of defining FAKE_FLAGS to be DESTDIR=${WRKINST} if it's not defined,
it's now going to take MAKE_FLAGS into account, and to add DESTDIR if needed...

Index: bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.740
diff -u -p -r1.740 bsd.port.mk
--- bsd.port.mk 27 Nov 2005 12:31:18 -0000 1.740
+++ bsd.port.mk 22 Dec 2005 12:33:01 -0000
@@ -264,8 +264,11 @@ DESTDIR?= ${WRKINST}
 
 MAKE_FLAGS?=
 LIBTOOL_FLAGS?=
-.if !defined(FAKE_FLAGS)
-FAKE_FLAGS=${DESTDIRNAME}=${WRKINST}
+
+.if empty(DESTDIRNAME)
+FAKE_FLAGS?=${MAKE_FLAGS}
+.else
+FAKE_FLAGS?=${MAKE_FLAGS} ${DESTDIRNAME}=${WRKINST}
 .endif
 
 CONFIGURE_STYLE?=