On Friday, 04.03.2016 at 16:31, Antti Kantee wrote:
> On 04/03/16 16:23, Martin Lucina wrote:
> >On Friday, 04.03.2016 at 16:05, Antti Kantee wrote:
> >>On 04/03/16 15:38, Martin Lucina wrote:
> >>>Two patches here, one for rumprun (the user of these variables), another
> >>>for src-netbsd. Please review. Fixes rumprun issue #38 (build fails on
> >>>certain distros with dash as /bin/sh).
> >>
> >>Those variables the current public "API", so I'd not remove the old
> >>variables, just += the new ones.
> >
> >Not sure if that's possible. RUMPCOMP_USER_PATH is used to set .PATH, which
> >according to the make documentation must be updated by setting the .PATH
> >target, so there's no easy way to do +=.
> 
> .PATH is essentially +=, i.e. you can specify it many times.  However, I'm
> not sure if it will barf from an empty value or not, but in any case you can
> use an intermediate variable.

Ok, how about this (updated patch to src-netbsd). Tested with the new
variables in lib/Makefile.pcicommon, not with the old ones, but it should
work.

diff --git a/sys/rump/dev/lib/libpci/Makefile b/sys/rump/dev/lib/libpci/Makefile
index ee314d3..36dd463 100644
--- a/sys/rump/dev/lib/libpci/Makefile
+++ b/sys/rump/dev/lib/libpci/Makefile
@@ -31,14 +31,22 @@ CPPFLAGS+= -I${RUMPTOP}/librump/rumpvfs
 .error RUMP_PCI_IOSPACE defined in Makefile.  Use userfeatures.h instead.
 .endif
 
-.PATH:                 ${RUMPCOMP_USER_PATH.rumpdev_pci}
+# the "."-separated names below are deprecated due to relying on non-POSIX
+# /bin/sh, new users please use the "_"-separated names
+MYPATH=                        ${RUMPCOMP_USER_PATH.rumpdev_pci}
+MYPATH+=               ${RUMPCOMP_USER_PATH_rumpdev_pci}
+.PATH:                 ${MYPATH}
 RUMPCOMP_USER_SRCS=    ${RUMPCOMP_USER_SRCS.rumpdev_pci}
+RUMPCOMP_USER_SRCS+=   ${RUMPCOMP_USER_SRCS_rumpdev_pci}
 MYDIR:=                        ${.PARSEDIR}
 RUMPCOMP_USER_CPPFLAGS=        -I${MYDIR}
 RUMPCOMP_USER_CPPFLAGS+=${RUMPCOMP_USER_CPPFLAGS.rumpdev_pci}
+RUMPCOMP_USER_CPPFLAGS+=${RUMPCOMP_USER_CPPFLAGS_rumpdev_pci}
 RUMPCOMP_USER_CFLAGS=  ${RUMPCOMP_USER_CFLAGS.rumpdev_pci}
+RUMPCOMP_USER_CFLAGS+= ${RUMPCOMP_USER_CFLAGS_rumpdev_pci}
 
 CPPFLAGS+=             ${RUMPCOMP_CPPFLAGS.rumpdev_pci}
+CPPFLAGS+=             ${RUMPCOMP_CPPFLAGS_rumpdev_pci}
 
 # XXX: messy
 .undef RUMPKERN_ONLY
@@ -47,6 +55,10 @@ CPPFLAGS+=           ${RUMPCOMP_CPPFLAGS.rumpdev_pci}
 .warning RUMPCOMP_MAKEFILEINC interface is unstable and may change
 .include "${RUMPCOMP_MAKEFILEINC.rumpdev_pci}"
 .endif
+.ifdef RUMPCOMP_MAKEFILEINC_rumpdev_pci
+.warning RUMPCOMP_MAKEFILEINC interface is unstable and may change
+.include "${RUMPCOMP_MAKEFILEINC_rumpdev_pci}"
+.endif
 
 .include "${RUMPTOP}/Makefile.rump"
 .include <bsd.lib.mk>

Reply via email to