################################################################
DBMS   ?= localhost  # localhost | pasquale | pasquale-devel
AUTH   ?=            # ia2token | garrtoken | <empty>
################################################################

all: authpolicy.properties web.xml discovery.properties

web.xml:
	cd web-xml && cat web.xml-begining web.xml-format-filter web.xml-$(AUTH)-filter web.xml-authorization-filter web.xml-servlets web.xml-ending > ../web.xml

discovery.properties: discovery.properties.in
	cat dbms.conf-$(DBMS) discovery.properties.in > $@

authpolicy.properties: dbms.conf-$(DBMS)
	cp dbms.conf-$(DBMS) $@

.PHONY:
clean:
	-rm -f authpolicy.properties discovery.properties web.xml
