TESTDIR = test INSTALL_FLS = config.html config.js index.html index.js imgsort.php style.css SRC_DIR = src SASS_CMD = sass --color --load-path=src/sass .PHONY: install start stop test php install: ifndef DEST $(error Usage: `make install DEST=/installation/directory`) endif mkdir -p $(DEST) install -m 0744 $(foreach f,$(INSTALL_FLS),$(SRC_DIR)/$(f)) $(DEST) # testing php: php -S localhost:8000 -t . & @# firefox http://localhost:8000/src/index.html stop: -killall php # Compile the sass css: $(SASS_CMD) --no-indented src/sass/main.sass src/style.css test: -@rm -r $(TESTDIR) -@mkdir -p $(TESTDIR) $(TESTDIR)/staging $(TESTDIR)/dest1 $(TESTDIR)/dest2 $(TESTDIR)/dest3 -@cp testres/* $(TESTDIR)/staging