changeset 26:b296ea10b8f5

install the sql in $PREFIX/share
author David A. Holland
date Sun, 26 May 2013 22:04:04 -0400
parents 813a27f32072
children 021ec7010271
files database/Makefile
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/database/Makefile	Sun May 26 21:58:46 2013 -0400
+++ b/database/Makefile	Sun May 26 22:04:04 2013 -0400
@@ -1,4 +1,14 @@
 TOP=..
 include $(TOP)/mk/base.mk
 
-all depend install clean distclean: ;
+all depend clean distclean: ;
+
+INSTDIR=$(DESTDIR)$(PREFIX)/share/swallowtail/sql
+
+install:
+	[ -d $(INSTDIR) ] || mkdir -p $(INSTDIR)
+	[ -d $(INSTDIR)/init ] || mkdir -p $(INSTDIR)/init
+	[ -d $(INSTDIR)/schema ] || mkdir -p $(INSTDIR)/schema
+	$(INSTALL) -c -m644 *.sql $(INSTDIR)/
+	$(INSTALL) -c -m644 init/*.sql $(INSTDIR)/init/
+	$(INSTALL) -c -m644 schema/*.sql $(INSTDIR)/schema/