diff options
-rw-r--r-- | Makefile | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -1,3 +1,14 @@ +PY?=python3 +SERVERMODULE=http.server + +ifeq ($(PY), tauthon) + SERVERMODULE = SimpleHTTPServer +else ifeq ($(PY), python2) + SERVERMODULE = SimpleHTTPServer +else ifeq ($(PY), python3) + SERVERMODULE = http.server +endif + help: @echo 'Makefile for generate styles, fonts, icons, js to cl-theme ' @echo ' ' @@ -11,9 +22,12 @@ help: @echo ' make aplaylist compile playlist styles ' @echo ' make fonts generate fonts ' @echo ' make js compile javascript files ' + @echo ' make serve [PY=python] [PORT=8000] serve site at http://localhost:8000 ' @echo ' ' -all: clean bulma fonts icons js styles playlist aplaylist +all: generate + +generate: clean bulma fonts icons js styles playlist aplaylist clean: @rm -rf dist/ @@ -37,3 +51,10 @@ fonts: @bash scripts/fonts.sh js: @bash scripts/js.sh + +serve: generate +ifdef PORT + $(PY) -m $(SERVERMODULE) $(PORT) +else + $(PY) -m $(SERVERMODULE) +endif |