-lib/dirs.c: Makefile
- ($(ro_c) && \
- echo 'const char ovs_pkgdatadir[] = "$(pkgdatadir)";' && \
- echo 'const char ovs_rundir[] = "@RUNDIR@";' && \
- echo 'const char ovs_logdir[] = "@LOGDIR@";' && \
- echo 'const char ovs_bindir[] = "$(bindir)";') > lib/dirs.c.tmp
+EXTRA_DIST += lib/vswitch-idl.ann
+VSWITCH_IDL_FILES = vswitchd/vswitch.ovsschema lib/vswitch-idl.ann
+lib/vswitch-idl.ovsidl: $(VSWITCH_IDL_FILES)
+ $(OVSDB_IDLC) -C $(srcdir) annotate $(VSWITCH_IDL_FILES) > $@.tmp
+ mv $@.tmp $@
+
+lib/dirs.c: lib/dirs.c.in Makefile
+ ($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
+ -e 's,[@]srcdir[@],$(srcdir),g' \
+ -e 's,[@]LOGDIR[@],"$(LOGDIR)",g' \
+ -e 's,[@]RUNDIR[@],"$(RUNDIR)",g' \
+ -e 's,[@]DBDIR[@],"$(DBDIR)",g' \
+ -e 's,[@]bindir[@],"$(bindir)",g' \
+ -e 's,[@]sysconfdir[@],"$(sysconfdir)",g' \
+ -e 's,[@]pkgdatadir[@],"$(pkgdatadir)",g') \
+ > lib/dirs.c.tmp