about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libstore/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstore/Makefile b/src/libstore/Makefile
index 83c5d8ed49b7..dcedd4c26ab8 100644
--- a/src/libstore/Makefile
+++ b/src/libstore/Makefile
@@ -19,3 +19,8 @@ libstore_CXXFLAGS = \
  -DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \
  -DNIX_BIN_DIR=\"$(bindir)\" \
  -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\"
+
+$(d)/local-store.cc: $(d)/schema.sql.hh
+
+%.sql.hh: %.sql
+	sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/' < $< > $@ || (rm $@ && exit 1)