about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-09T21·10+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-09T21·10+0100
commitb1db599dd05e86f65e73dc40584913e6e78c2bac (patch)
treefbd8a4f04bab320661901dd693dae5110c481ebe /src/libstore
parentcf918b889b2ff30d1532a62d00c21007d0cb25cd (diff)
Generate schema.sql.hh
Diffstat (limited to 'src/libstore')
-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)