usb4bsd: Hook the userland part into the build.
authorSascha Wildner <saw@online.de>
Wed, 26 Sep 2012 00:00:09 +0000 (02:00 +0200)
committerSascha Wildner <saw@online.de>
Thu, 11 Oct 2012 09:27:36 +0000 (11:27 +0200)
Define a new make.conf(5) variable, WANT_USB4BSD, which (if set) causes
the new USB's userland to be built (similar to WANT_NETGRAPH7).

etc/mtree/BSD.include.dist
include/Makefile
lib/Makefile
share/man/man5/make.conf.5
usr.bin/Makefile
usr.sbin/Makefile

index bdb18e6..fcc6bac 100644 (file)
@@ -24,6 +24,8 @@
         ..
         usb
         ..
+        u4b
+        ..
     ..
     c++
         4.4
index 91eedbd..d99b455 100644 (file)
@@ -75,7 +75,7 @@ LSUBDIRS=     bus/cam bus/cam/scsi \
        netgraph7/mppc netgraph7/one2many netgraph7/ppp netgraph7/pppoe \
        netgraph7/pptpgre netgraph7/rfc1490 netgraph7/socket \
        netgraph7/tcpmss netgraph7/tee netgraph7/tty netgraph7/vjc \
-       bus/cam bus/usb bus/pccard bus/pci bus/isa bus/ppbus bus/smbus \
+       bus/cam bus/pccard bus/pci bus/isa bus/ppbus bus/smbus \
        netproto/atm netproto/ipsec netproto/ipx \
        netproto/key netproto/natm netproto/ncp netproto/smb \
        netproto/atm/ipatm netproto/atm/sigpvc netproto/atm/spans \
@@ -88,6 +88,12 @@ LSUBDIRS=    bus/cam bus/cam/scsi \
        dev/raid/ciss dev/raid/mfi \
        dev/video/bktr dev/video/meteor libprop
 
+.if defined(WANT_USB4BSD)
+LSUBDIRS+=     bus/u4b
+.else
+LSUBDIRS+=     bus/usb
+.endif
+
 # For SHARED=symlinks, bus/cam and netproto/atm are symlinks, so cam/scsi
 # and netproto/atm/* are taken care of
 LSYMSUBDIRS=   ${LSUBDIRS:Nbus/cam/scsi:Nnetproto/atm/*:Nnet/*:Nnetgraph/*:Nnetgraph7/*}
index 29f91af..a25db71 100644 (file)
@@ -85,7 +85,7 @@ SUBDIR=       ${SUBDIR_ORDERED} \
        libstand \
        libtcplay \
        libtelnet \
-       libusbhid \
+       ${_libusbhid} \
        libvgl \
        libwrap \
        libxpg4 \
@@ -115,4 +115,10 @@ _libnetgraph=      libnetgraph7
 _libnetgraph=  libnetgraph
 .endif
 
+.if defined(WANT_USB4BSD)
+_libusbhid=    libu4bhid
+.else
+_libusbhid=    libusbhid
+.endif
+
 .include <bsd.subdir.mk>
index 151d3ee..7c17acf 100644 (file)
@@ -545,6 +545,11 @@ userland.
 It has to be accompanied by
 .Dv NETGRAPH7*
 options in the kernel.
+.It Va WANT_USB4BSD
+.Pq Vt bool
+Set to build a newer, experimental
+.Xr usb 4
+userland.
 .El
 .Pp
 The following list provides a name and short description for variables
index 66d18e6..cd1ebe4 100644 (file)
@@ -213,7 +213,7 @@ SUBDIR=     alias \
        uniq \
        units \
        unvis \
-       usbhidctl \
+       ${_usbhidctl} \
        users \
        uudecode \
        uuencode \
@@ -250,6 +250,12 @@ SUBDIR=    alias \
 SUBDIR+=hesinfo
 .endif
 
+.if defined(WANT_USB4BSD)
+_usbhidctl=    u4bhidctl
+.else
+_usbhidctl=    usbhidctl
+.endif
+
 .if !defined(NO_OPENSSL)
 SUBDIR+=bc \
        dc
index 4fa96ae..c685111 100644 (file)
@@ -124,8 +124,8 @@ SUBDIR= 802_11 \
        traceroute6 \
        trpt \
        tzsetup \
-       usbd \
-       usbdevs \
+       ${_usbd} \
+       ${_usbdevs} \
        vidcontrol \
        vipw \
        vknetd \
@@ -141,6 +141,11 @@ SUBDIR= 802_11 \
        ypset \
        zic
 
+.if !defined(WANT_USB4BSD)
+_usbd= usbd
+_usbdevs=usbdevs
+.endif
+
 .if !defined(NO_LPR)
 SUBDIR+=lpr
 .endif