SCHEMAS = basic.basic hmi.basic \ metadatadb.basic cache.basic \ gateway.basic \ scenario.basic \ lamp.basic lamp.dimmer lamp.color lamp.toggle \ powerrelay.basic powerrelay.toggle \ switch.basic button.basic button.remote \ powermeter.basic linkquality.basic battery.basic \ door.basic window.basic \ shutter.basic shutter.position worktop.basic \ thermometer.basic hygrometer.basic barometer.basic co2meter.basic \ luxmeter.basic lightgauge.basic soundmeter.basic \ raingauge.basic windgauge.basic \ scale.basic \ motion.basic \ contact.basic \ falldetector.basic \ tts.basic test: @$(foreach i,$(SCHEMAS),./validate_schema -s $(i);) MAKE_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) web: @$(foreach i,$(SCHEMAS),echo "- [$(i)]($(i)): `jq -r .description $(MAKE_DIR)/$(i)`";) @if [ -z "$(INSTALL_DIR)" ]; then echo -e "\nError: INSTALL_DIR undefined">&2; exit -1; fi @$(foreach i,$(SCHEMAS),if [ ! -e "$(INSTALL_DIR)/$(i)" ]; then ln -s -t "$(INSTALL_DIR)" "`realpath --relative-to=$(INSTALL_DIR) $(MAKE_DIR)/$(i)`"; fi;) clean: -rm -f *~ .PHONY: test clean