X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=Makefile-web;h=20a1a2f3e70c039d121282ddc7fa379124487ae8;hp=78954661da0b1091329c01f20ce72a6ba8e826b4;hb=8fc1b23065309df44a3725ec7dba76dfebc9cbd2;hpb=10e5e329a1a8804ff6461e1724071364cf6be572 diff --git a/Makefile-web b/Makefile-web index 78954661..20a1a2f3 100644 --- a/Makefile-web +++ b/Makefile-web @@ -1,9 +1,9 @@ # This can be overridden on cmdline to generate pages elsewhere. WEBDIR=/home/rusty/www/html/ccan -ALL_PAGES=$(patsubst %, $(WEBDIR)/info/%.html, $(MODS_NORMAL) $(MODS_EXTERNAL)) -DIRECT_TARBALLS=$(patsubst %, $(WEBDIR)/tarballs/%.tar.bz2, $(MODS_NORMAL) $(MODS_EXTERNAL)) -DEPEND_TARBALLS=$(patsubst %, $(WEBDIR)/tarballs/with-deps/%.tar.bz2, $(MODS_NORMAL) $(MODS_EXTERNAL)) +ALL_PAGES=$(patsubst %, $(WEBDIR)/info/%.html, $(MODS)) +DIRECT_TARBALLS=$(patsubst %, $(WEBDIR)/tarballs/%.tar.bz2, $(MODS)) +DEPEND_TARBALLS=$(patsubst %, $(WEBDIR)/tarballs/with-deps/%.tar.bz2, $(MODS)) WEB_SUBDIRS=$(WEBDIR)/tarballs $(WEBDIR)/junkcode $(WEBDIR)/tarballs/with-deps $(WEBDIR)/info JUNKDIRS=$(wildcard junkcode/*) JUNKPAGES=$(JUNKDIRS:%=$(WEBDIR)/%.html) @@ -40,7 +40,7 @@ $(WEBDIR)/ccan.tar.bz2: config.h Makefile Makefile-ccan $(shell git ls-files cca $(ALL_PAGES): tools/doc_extract web/staticmoduleinfo.php $(WEBDIR)/list.html: web/staticall.php tools/doc_extract $(DIRECT_TARBALLS) $(DEPEND_TARBALLS) $(WEBDIR)/ccan.tar.bz2 $(JUNKBALLS) - php5 web/staticall.php ccan/ junkcode/ $(WEBDIR) > $@ + php5 web/staticall.php ccan/ junkcode/ $(WEBDIR) $(MODS) > $@ $(WEBDIR)/upload.html: web/staticupload.php php5 web/staticupload.php > $@ @@ -62,13 +62,16 @@ $(WEBDIR)/ccan.jpg: web/ccan.jpg cp $< $@ $(WEBDIR)/info/%.html: $(WEBDIR)/tarballs/%.tar.bz2 $(WEBDIR)/tarballs/with-deps/%.tar.bz2 - URLPREFIX=../ php5 web/staticmoduleinfo.php `pwd`/ccan/$* > $@ + @mkdir -p `dirname $@` + URLPREFIX=../`echo $* | tr -dc '/' | sed s',/,../,g'` php5 web/staticmoduleinfo.php `pwd`/ccan/$* $* > $@ $(WEBDIR)/tarballs/%.tar.bz2: ccan/%/_info clean-tree - tar -c -j -f $@ $$(git ls-files ccan/$*) $$(git ls-files ccan/$* | xargs -n1 -r readlink | sed -n 's,^../../,,p' | sort -u) + @mkdir -p `dirname $@` + FILES=$$(tools/list_files.sh ccan/$*) && tar -c -j -f $@ $$FILES $$(echo $$FILES | xargs -n1 -r readlink | sed 's,^\(../\)*,,' | sort -u) $(WEBDIR)/tarballs/with-deps/%.tar.bz2: ccan/%/_info tools/ccan_depends clean-tree - tar -c -j -f $@ $$(git ls-files $$(echo ccan/$* $$(tools/ccan_depends ccan/$*) ) ) $$(git ls-files $$(echo ccan/$* $$(tools/ccan_depends ccan/$*) ) | xargs -n1 -r readlink | sed -n 's,^../../,,p' | sort -u) + @mkdir -p `dirname $@` + FILES=$$(tools/list_files.sh ccan/$* $$(tools/ccan_depends ccan/$*) ) && tar -c -j -f $@ $$FILES $$(echo $$FILES | xargs -n1 -r readlink | sed 's,^\(../\)*,,' | sort -u) distclean: distclean-web