-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
+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