File: Makefile

package info (click to toggle)
debian-timeline 12
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 176 kB
  • ctags: 10
  • sloc: python: 38; makefile: 29
file content (32 lines) | stat: -rw-r--r-- 718 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
INPUT	:= $(wildcard data/*)
OUTPUT	:= $(addsuffix .xml,$(subst data/,xml/,$(basename $(INPUT))))
DESTDIR := /
TARGET  := $(DESTDIR)/usr/share/debian-timeline

all: build check

check:
	@set -e; for LIBS in ajax js; do \
	  if [ ! -e media/timeline_$$LIBS ]; then \
	    echo "Warning - media/timeline_$$LIBS does not exist or is an invalid symlink."; \
	  fi \
	done

xml/%.xml: data/%
	@mkdir -p xml
	./build.py $< >$@

build: $(OUTPUT)

clean:
	rm -rf xml

install: build
	install -d $(TARGET)
	install -m644 -t $(TARGET) index.html 
	set -e; for DIR in media xml; do \
		install -d $(TARGET)/$$DIR; \
		install -m644 -t $(TARGET)/$$DIR `find $$DIR -mindepth 1 -type f`; \
	done

.PHONY: install clean install check