tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Is OS-specific logic in buildlink3.mk allowed?



Hi!

Quick question about buildlink3:

I am looking at devel/libtirpc, which is marked ONLY_FOR_PLATFORM=Linux-*-*. This is because BSD systems include the tirpc code as part of base.

Thus, any dependency on this library is probably of the form

+.if ${OPSYS} == "Linux"
+.include "../../devel/libtirpc/buildlink3.mk"
+.endif

So I was thinking of simplifying this by doing the following patch:

--- a/devel/libtirpc/buildlink3.mk
+++ b/devel/libtirpc/buildlink3.mk
@@ -2,6 +2,8 @@

 BUILDLINK_TREE+=               libtirpc

+.if ${OSTYPE} == "Linux"
+
 .if !defined(LIBTIRPC_BUILDLINK3_MK)
 LIBTIRPC_BUILDLINK3_MK:=

@@ -15,4 +17,6 @@ BUILDLINK_LIBS.libtirpc= ${BUILDLINK_LIBNAME.libtirpc:S/^/-l/:S/^-l$//}

 .endif # LIBTIRPC_BUILDLINK3_MK

+.endif # Linux
+
 BUILDLINK_TREE+=       -libtirpc

Is that allowed? :)

--
Benny


Home | Main Index | Thread Index | Old Index