]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix building with a dev manager
authorRoy Marples <roy@marples.name>
Thu, 12 Sep 2013 17:08:34 +0000 (17:08 +0000)
committerRoy Marples <roy@marples.name>
Thu, 12 Sep 2013 17:08:34 +0000 (17:08 +0000)
Makefile
configure
dev.h

index 31da4f163fa01db01011096ec9e60f6b1ccc021a..b619be28bbcf297efb128d97815ea81251f5b022 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ SRCS+=          dhcp-common.c
 
 CFLAGS?=       -O2
 CSTD?=         c99
+MKDIRS=
 include config.mk
 CFLAGS+=       -std=${CSTD}
 
@@ -27,7 +28,7 @@ CLEANFILES+=  .depend
 FILES=         dhcpcd.conf
 FILESDIR=      ${SYSCONFDIR}
 
-SUBDIRS=       dhcpcd-hooks dev
+SUBDIRS=       dhcpcd-hooks ${MKDIRS}
 
 SED_DBDIR=             -e 's:@DBDIR@:${DBDIR}:g'
 SED_LIBDIR=            -e 's:@LIBDIR@:${LIBDIR}:g'
index 37090bb178601670b5a1250e3819a4b7d058b6d6..975ab3c6080e9897361f2d7ba330561a1c79aced 100755 (executable)
--- a/configure
+++ b/configure
@@ -607,10 +607,9 @@ if [ "$DEV" != no -a "$UDEV" != no ]; then
        printf "Checking for libudev ... "
        LIBUDEV_CFLAGS=$(pkg-config --cflags libudev 2>/dev/null)
        LIBUDEV_LIBS=$(pkg-config --libs libudev 2>/dev/null)
-       [ -z "$DEV" ] && DEV=yes
 fi
 if [ "$DEV" != no -a "$UDEV" != no -a -n "$LIBUDEV_LIBS" ]; then
-       echo "yes"
+       [ -z "$DEV" ] && DEV=yes
        echo "DEV_PLUGINS+=     udev" >>$CONFIG_MK
        if [ -n "$LIBUDEV_CFLAGS" ]; then
                echo "LIBUDEV_CFLAGS=           $LIBUDEV_CFLAGS" >>$CONFIG_MK
@@ -641,7 +640,8 @@ fi
 if [ "$DEV" = yes ]; then
        echo "SRCS+=            dev.c" >>$CONFIG_MK
        echo "CPPFLAGS+=        -DPLUGIN_DEV" >>$CONFIG_MK
-       echo "LDFLAGS+=         -Wl,--export-dynamic" >>$CONFIG_MK
+       echo "LDFLAGS+= -Wl,--export-dynamic" >>$CONFIG_MK
+       echo "MKDIRS+=          dev"
 fi
 
 if [ -z "$SERVICECMD" ]; then
diff --git a/dev.h b/dev.h
index 0db2fcfad578736c156461913f9c355dea92dfc5..bea3117bb7fe2e9c9259202581db079988f89c39 100644 (file)
--- a/dev.h
+++ b/dev.h
@@ -46,8 +46,8 @@ void dev_stop(void);
 #else
 #define dev_initialized(a) 1
 #define dev_listening() 0
-#define dev_start(a)
-#define dev_stop()
+#define dev_start(a) {}
+#define dev_stop() {}
 #endif
 
 #endif