initscript: pass complete path to pidfile to status command
[sliver-openvswitch.git] / Makefile.am
index dccb8cf..add0e72 100644 (file)
@@ -9,7 +9,6 @@ AUTOMAKE_OPTIONS = foreign subdir-objects
 ACLOCAL_AMFLAGS = -I m4
 SUBDIRS = datapath
 
-if ENABLE_USERSPACE
 AM_CPPFLAGS = $(SSL_CFLAGS)
 AM_CPPFLAGS += $(NCURSES_CFLAGS)
 AM_CPPFLAGS += $(PCRE_CFLAGS)
@@ -29,6 +28,7 @@ CLEANFILES =
 DISTCLEANFILES =
 EXTRA_DIST = INSTALL.bridge \
        INSTALL.Linux \
+       INSTALL.userspace \
        INSTALL.OpenFlow \
        INSTALL.SSL \
        INSTALL.XenServer 
@@ -52,11 +52,22 @@ ro_c = echo '/* -*- mode: c; buffer-read-only: t -*- */'
 SUFFIXES = .in
 .in:
        $(PERL) $(srcdir)/soexpand.pl -I$(srcdir) < $< | \
-           sed -e 's,[@]LOGDIR[@],$(LOGDIR),g' \
+           sed \
                -e 's,[@]PKIDIR[@],$(PKIDIR),g' \
+                -e 's,[@]LOGDIR[@],$(LOGDIR),g' \
+                -e 's,[@]PERL[@],$(PERL),g' \
+                -e 's,[@]PYTHON[@],$(PYTHON),g' \
                 -e 's,[@]RUNDIR[@],$(RUNDIR),g' \
+                -e 's,[@]VERSION[@],$(VERSION),g' \
+                -e 's,[@]localstatedir[@],$(localstatedir),g' \
                 -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
-                -e 's,[@]PERL[@],$(PERL),g' > $@
+                -e 's,[@]sysconfdir[@],$(sysconfdir),g' \
+            > $@.tmp
+       @if head -n 1 $@.tmp | grep -q '#!'; then \
+           echo chmod +x $@.tmp; \
+           chmod +x $@.tmp; \
+       fi
+       mv $@.tmp $@
 
 include lib/automake.mk
 include ofproto/automake.mk
@@ -67,9 +78,4 @@ include third-party/automake.mk
 include debian/automake.mk
 include vswitchd/automake.mk
 include xenserver/automake.mk
-if HAVE_CURSES
-if HAVE_PCRE
 include extras/ezio/automake.mk
-endif
-endif
-endif # ENABLE_USERSPACE