|
@@ -4,14 +4,16 @@
|
|
|
#
|
|
|
# GNUmakefile
|
|
|
|
|
|
+python := python
|
|
|
+
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
- ATTRIB := attrib
|
|
|
- RM_F := del /F /A
|
|
|
- TOUCH := python touch.py
|
|
|
+ attrib := attrib
|
|
|
+ rm := $(python) mk/rm.py
|
|
|
+ touch := $(python) mk/touch.py
|
|
|
else
|
|
|
- ATTRIB := true
|
|
|
- RM_F := rm -f
|
|
|
- TOUCH := touch
|
|
|
+ attrib := true
|
|
|
+ rm := rm
|
|
|
+ touch := touch
|
|
|
endif
|
|
|
|
|
|
pyc := $(patsubst %.py,%.pyc,$(wildcard *.py */*.py))
|
|
@@ -21,17 +23,17 @@ pyc := $(patsubst %.py,%.pyc,$(wildcard *.py */*.py))
|
|
|
all: dthome.wsgi
|
|
|
|
|
|
dthome.wsgi: .requirements $(pyc) $(wildcard views/*.tpl)
|
|
|
- $(TOUCH) $@
|
|
|
+ $(touch) $@
|
|
|
|
|
|
requirements: .requirements
|
|
|
|
|
|
.requirements: requirements.txt
|
|
|
- python pkg.py install -r requirements.txt
|
|
|
- $(TOUCH) $@
|
|
|
- $(ATTRIB) +H $@
|
|
|
+ $(python) mk/pkg.py install -r requirements.txt
|
|
|
+ $(touch) $@
|
|
|
+ $(attrib) +H $@
|
|
|
|
|
|
%.pyc: %.py
|
|
|
- python -m py_compile $<
|
|
|
+ $(python) -m py_compile $<
|
|
|
|
|
|
clean:
|
|
|
- -$(RM_F) .requirements $(pyc)
|
|
|
+ -$(rm) -fv .requirements $(pyc)
|