diff --git a/www.videolan.org/Makefile b/www.videolan.org/Makefile index eaa3b808b502588d2f768e6ae399456b340e725c..4032377fdc4f7c03c5f586d035210e4e3afd654e 100755 --- a/www.videolan.org/Makefile +++ b/www.videolan.org/Makefile @@ -28,7 +28,7 @@ ifneq ($(PHP_IGNORES),) PHP_FILES := $(filter-out $(PHP_IGNORES:%=%.php), $(PHP_FILES)) endif -TARGETS := $(PHP_FILES:%.php=%.html) +TARGETS := $(PHP_FILES:%.php=%.html) $(ROOT)/include/mirrors.php real-all: $(TARGETS) all-recursive @@ -41,7 +41,7 @@ clean: clean-recursive HERE=$(HERE)$$d/ || exit $$? ; \ done -%.html: %.php $(ROOT)Makefile $(ROOT)/include/*.php $(ROOT)/include/*.php $(ROOT)/include/mirrors $(ROOT)/include/menu/* +%.html: %.php $(ROOT)Makefile $(ROOT)/include/*.php $(ROOT)/include/*.php $(ROOT)/include/mirrors.php $(ROOT)/include/menu/* @echo "Preprocessing $@ ..." @rm -f $@.tmp @cd $(ROOT) || exit 1 ; \ @@ -53,6 +53,9 @@ clean: clean-recursive @$(STRIP_HEADERS) < $@.tmp > $@ @rm -f $@.tmp +$(ROOT)/include/mirrors.php: $(ROOT)/include/mirrors + @echo "Processing $< ..." + awk -F '|' 'BEGIN { print "/* This file is automatically generated from the mirrors file. Do not edit */\nmirrors = {" } !/^#/{print " { \""$$1"\", \""$$2"\", \""$$3"\", \""$$4"\", \""$$5"\", "$$6" },"} END { print "};" }' $< > $<.php .PHONY: clean all diff --git a/www.videolan.org/mirror-geo.php b/www.videolan.org/mirror-geo.php index ab97ac06211854514cbfd5cc16a5e11779f8905c..59c343e9e8ded6f5580527b146165496dabb02c0 100644 --- a/www.videolan.org/mirror-geo.php +++ b/www.videolan.org/mirror-geo.php @@ -5,14 +5,15 @@