Commit e24acdf4 authored by Raphael Cauderlier's avatar Raphael Cauderlier

Installation

The script dktactics get installed in INSTALL_BIN_DIR; its only
purpose is to print the path INSTALL_LIB_DIR in which the dko files
are installed.
parent f85563e7
.config_vars
*/*.dko
*/*.dk.depend
dktactics
-include .config_vars
INSTALL_BIN_DIR=/usr/local/bin
INSTALL_LIB_DIR=/usr/local/lib/dedukti/dktactics
SUBDIRS= fol meta # example
all:
......@@ -12,5 +14,28 @@ clean:
for d in $(SUBDIRS); do\
$(MAKE) clean -C $$d; \
done
rm -f dktactics
dktactics:
echo "#!/bin/sh" > $@
echo "echo \"$(INSTALL_LIB_DIR)\"" >> $@
install: all dktactics
mkdir -p $(INSTALL_LIB_DIR)
for d in $(SUBDIRS); do \
$(MAKE) INSTALL_LIB_DIR=$(INSTALL_LIB_DIR)/$$d install -C $$d; \
done
mkdir -p $(INSTALL_BIN_DIR)
install -t $(INSTALL_BIN_DIR) dktactics
uninstall:
for d in $(SUBDIRS); do \
$(MAKE) INSTALL_LIB_DIR=$(INSTALL_LIB_DIR)/$$d uninstall -C $$d; \
done
rm -f $(INSTALL_BIN_DIR)/dktactics
rmdir $(INSTALL_LIB_DIR)
.config_vars: configure
./configure
.PHONY: clean install uninstall all
......@@ -9,15 +9,10 @@ endif
# Dedukti files
DKS = $(wildcard *.dk)
DKOS = $(DKS:.dk=.dko)
DKDEPENDS = $(DKS:.dk=.dk.depend)
-include $(DKDEPENDS)
DKCHECK_OPTIONS =
all: $(DKOS)
.PHONY: clean depend
DKCHECK_OPTIONS =
%.dko:
$(DKCHECK) -e $(DKCHECK_CONFLUENCE_OPTION) $(DKCHECK_OPTIONS) $<
......@@ -25,7 +20,22 @@ DKCHECK_OPTIONS =
%.dk.depend: %.dk
$(DKDEP) $< > $@
DKDEPENDS = $(DKS:.dk=.dk.depend)
-include $(DKDEPENDS)
depend: $(DKDEPENDS)
clean:
rm -f *.dko *.depend
install: all
mkdir -p $(INSTALL_LIB_DIR)
install -t $(INSTALL_LIB_DIR) $(DKOS)
uninstall:
for f in $(DKOS); do \
rm -f $(INSTALL_LIB_DIR)/$$f; \
done
rmdir $(INSTALL_LIB_DIR)
.PHONY: clean depend install uninstall all
......@@ -2,25 +2,39 @@ include ../.config_vars
# Dedukti files
DKS = $(wildcard *.dk)
FOLDKS = $(wildcard ../fol/*.dk)
DKOS = $(DKS:.dk=.dko)
DKDEPENDS = $(DKS:.dk=.dk.depend)
-include $(DKDEPENDS)
DKCHECK_OPTIONS = -I ../fol -nl
all: $(DKOS)
.PHONY: clean depend
DKCHECK_OPTIONS = -I ../fol -nl
%.dko:
$(DKCHECK) -e $(DKCHECK_OPTIONS) $<
# For each dependency foo.dko in the ../fol directory, the previous
# rule will try to create foo.dko here by calling "dkcheck -e" without
# file argument. This actually succeeds but does not produce any file.
# foo.dk.depend lists the modules foo depends on
%.dk.depend: %.dk
$(DKDEP) $< > $@
DKDEPENDS = $(DKS:.dk=.dk.depend)
-include $(DKDEPENDS)
depend: $(DKDEPENDS)
clean:
rm -f *.dko *.depend
install: all
mkdir -p $(INSTALL_LIB_DIR)
install -t $(INSTALL_LIB_DIR) $(DKOS)
uninstall:
for f in $(DKOS); do \
rm -f $(INSTALL_LIB_DIR)/$$f; \
done
rmdir $(INSTALL_LIB_DIR)
.PHONY: clean depend install uninstall all
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment