engine

website and gopher hole static engine
git clone git://kh1b.org/engine
Log | Files | Refs | README

Makefile (826B)


      1 .PHONY: all clean install
      2 
      3 include config.mk
      4 
      5 all: $(OUTPUT) repos clean_html
      6 
      7 repos:
      8 	@for repo in $(REPO_PATHS); do \
      9 		repo_name=$$(basename $$repo); \
     10 		echo "Creating repo dir: $$repo_name"; \
     11 		mkdir -p $$repo_name; \
     12 		cd $$repo_name && stagit $$repo; \
     13 		cd ..; \
     14 	done
     15 
     16 $(OUTPUT): $(REPO_PATHS)
     17 	@echo "Generating index file..."
     18 	stagit-index $(REPO_PATHS) > $@
     19 
     20 clean_html:
     21 	@echo "cleanup script..."
     22 	$(CLEAN_SCRIPT)
     23 
     24 clean:
     25 	@echo "Cleaning generated files and directories..."
     26 	rm -rf $(OUTPUT) $(WEBROOT)
     27 
     28 install: all
     29 	@echo "Generating deployment directory: $(WEBROOT)..."
     30 	@mkdir -p $(WEBROOT)
     31 
     32 	@echo "Copying index.html and style.css..."
     33 	@cp -r index.html style.css $(WEBROOT)
     34 
     35 	@echo "Copying all directories..."
     36 	@find . -maxdepth 1 -type d ! -name "$(WEBROOT)" ! -name "." -exec cp -r {} $(WEBROOT)/ \;
     37