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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
# -*- makefile -*-
.PHONY: all ben pool sign rebuild
all: index.html missing.svg failures.txt
ben:
( cd ben && rm -f ben.cache && ben download -c download.ben )
pool:
touch pool/stamp && $(MAKE) -C pool -f ../usr/lib/Makefile.pool
sign:
$(MAKE) -C pool -f ../usr/lib/Makefile.pool InRelease
rebuild:
( cd ben && ben rebuild $(BEN_REBUILD_OPTS) rebuild.ben -o ../missing.txt )
index.html: pool/Release
. ben/env.sh; \
DATE=$$(sed -n 's/Date: //p' $<); \
BASE=$$(basename "$$PWD"); \
sed \
-e "s/@Base@/$$BASE/g" \
-e "s/@Name@/$$NAME/g" \
-e "s/@Date@/$$DATE/g" \
-e "s/@BaseSuite@/$$BASE_SUITE/g" \
-e "s/@SourceSuite@/$$SOURCE_SUITE/g" \
-e "s/@RebuiltSuite@/$$SUITE/g" \
-e "s=@UrlPrefix@=$$URL_PREFIX=g" \
ben/index.html.in > $@
missing.txt:
touch $@
missing.dot: missing.txt
{ \
echo "digraph transition {"; \
while read a b; do \
a="$${a%:}"; \
f="pool/$$a/reason.txt"; \
c=$$(if [ -f "$$f" ]; then tail -n1 "$$f" | sed -nr 's/^#.*\((.*)\)$$/\1/p'; fi); \
tooltip=$$(if [ -f "$$f" ]; then tail -n1 "$$f" | sed -nr 's/^# //p'; fi); \
tooltip=$$(if [ -n "$$tooltip" ]; then echo " tooltip=\"$$tooltip\""; fi); \
if [ -n "$$c" ]; then \
c="style=filled fillcolor=$$c "; \
fi; \
echo " \"$$a\" [$${c}URL=\"https://tracker.debian.org/$$a\"$$tooltip];"; \
for u in $$(echo $$b); do \
echo " \"$$a\" -> \"$$u\";"; \
done; \
done < $<; \
echo "}"; \
} > $@
failures.txt: missing.txt
while read a b; do \
if [ -z "$$b" ]; then \
f="pool/$${a%:}/reason.txt"; \
c=$$(if [ -f "$$f" ]; then tail -n1 "$$f" | grep -E '^#'; fi); \
if [ -n "$$c" ]; then \
printf "%-25s %s\n" "$$a" "$$c"; \
else \
echo "$$a"; \
fi; \
else \
echo "$$a $$b"; \
fi; \
done < $< > $@
%.svg: %.dot
dot -Tsvg $< > $@
|