[Commits] python.it commit r220 - in www/trunk: python.it scripts

commit a svn.python.it commit a svn.python.it
Dom 24 Set 2006 19:14:33 CEST


Author: manlio
Date: Sun Sep 24 19:14:26 2006
New Revision: 220

Added:
   www/trunk/python.it/Makefile   (contents, props changed)
   www/trunk/scripts/make.rules   (contents, props changed)
   www/trunk/scripts/rsync-excludes   (contents, props changed)
Removed:
   www/trunk/scripts/compila_sito.sh
   www/trunk/scripts/rsync.sh
Log:
aggiunto supporto make

Added: www/trunk/python.it/Makefile
==============================================================================
--- (empty file)
+++ www/trunk/python.it/Makefile	Sun Sep 24 19:14:26 2006
@@ -0,0 +1,42 @@
+ROOT_DIR=.
+ROOT_OFFSET=.
+
+include ../scripts/make.rules
+
+LOCAL_INCLUDE = --include "*.ht"
+
+SUBDIRS = doc faq help topics vari
+
+#EXTRA_TARGETS = channews.rdf SiteMap.html
+
+all: $(TARGETS)
+
+subdirs: $(SUBDIRS)
+
+
+# the multiple wildcards avoid use of the Unix find command and keep
+# the globbing within GNU make, so is presumably a bit more portable to
+# non-Unix platforms
+# SiteMap.ht: sitemap.py index.ht \
+# 	    $(wildcard */*/*/.sitemap-ignore) \
+# 	    $(wildcard */*/.sitemap-ignore) \
+# 	    $(wildcard */.sitemap-ignore)
+# 	#python sitemap.py >@; cp @ SiteMap.ht; rm @
+
+doc: always
+	(cd doc; $(MAKE))
+
+faq: always
+	(cd faq; $(MAKE))
+
+help: always
+	(cd help; $(MAKE))
+
+topics: always
+	(cd topics; $(MAKE))
+
+vari: always
+	(cd vari; $(MAKE))
+
+always:
+	@echo >/dev/null

Added: www/trunk/scripts/make.rules
==============================================================================
--- (empty file)
+++ www/trunk/scripts/make.rules	Sun Sep 24 19:14:26 2006
@@ -0,0 +1,83 @@
+# This requires GNU make.  -*- makefile -*-
+#
+# To use this, a script must include the following minimal set of
+# stuff:
+#
+# include relative/path/to/scripts/make.rules
+# ROOT_DIR = relative/path/to
+# ROOT_OFFSET = path/of/cwd/relative/to/ROOT_DIR
+#
+# E.g. for the cp4e directory:
+#
+# include ../scripts/make.rules
+# ROOT_DIR = ..
+# ROOT_OFFSET = cp4e
+
+# Make rules for www.python.org ht->html generation.  SOURCES
+# indirection filters out "*.ht" value when no ht files are around.
+SOURCES =	$(wildcard *.ht)
+HTTARGETS =	$(filter-out *.html,$(SOURCES:%.ht=%.html))
+TARGETS =	$(HTTARGETS) $(EXTRA_TARGETS)
+
+# Where to upload stuff for make install.  LIVE_ROOT is the actual
+# physical location of files on the server.
+LIVE_HOST = 	python.mydebian
+LIVE_DEST =	$(LIVE_HOST):python.it/$(ROOT_OFFSET)
+
+# rsync definitions.
+RSYNC_RSH =	ssh
+
+# Validation
+# (use the SGML_CATALOG_FILES enviroment variable) = /usr/share/sgml/html-4.01/HTML4.cat
+XMLLINT = xmllint
+
+EXCLUDE = --exclude-from=$(SCRIPTDIR)/rsync-excludes
+
+SCRIPTDIR =	../$(ROOT_DIR)/scripts
+HT2HTML =	$(SCRIPTDIR)/ht2html/ht2html.py
+HTSTYLE =	PDONewGenerator
+HTALLFLAGS =	-f -s $(HTSTYLE)
+HTROOT = 	$(ROOT_DIR)
+HTFLAGS =	$(HTALLFLAGS) -r $(HTROOT)
+
+GENERATED_HTML= $(SOURCES:.ht=.html)
+
+.SUFFIXES:	.ht .html
+.ht.html:
+		python $(HT2HTML) $(HTFLAGS) $<
+
+all: $(TARGETS)
+
+$(HTTARGETS): $(HT2HTML) $(SCRIPTDIR)/ht2html/$(HTSTYLE).py
+
+clean:
+	-rm -f *~
+
+realclean: clean
+	-rm $(GENERATED_HTML)
+
+install: all local_install
+	@if [ -z "$(ROOT_OFFSET)" ]; then \
+	  echo "You have to specify a value for 'ROOT_OFFSET' in the makefile!"; \
+	  false; \
+	fi
+	@echo Push to $(LIVE_DEST) ...
+	rsync --rsh=$(RSYNC_RSH) -v -r -l -t --update $(EXCLUDE) ./ $(LIVE_DEST)
+
+validate: $(TARGETS)
+	for f in $(TARGETS); \
+	do echo $$f;\
+	$(XMLLINT) --noout --valid --catalogs $$f; \
+	done
+
+
+# Override local_install in Makefile for directory-specific install actions.
+local_install:
+
+recursive: all
+	for dir in * ; do \
+            if [ -f $$dir/Makefile ] ; then \
+                echo "Changing to $$dir" ; \
+	        cd $$dir ; make recursive; cd .. ; \
+	    fi \
+	done

Added: www/trunk/scripts/rsync-excludes
==============================================================================
--- (empty file)
+++ www/trunk/scripts/rsync-excludes	Sun Sep 24 19:14:26 2006
@@ -0,0 +1,17 @@
+/*/*
+.rsync-excludes
+*.htp
+*.bak
+*.BAK
+*.orig
+*.rej
+*~
+.*
+@*
+*.prev
+core
+RCS
+CVS
+Makefile*
+*.new
+*.flc


Maggiori informazioni sulla lista Commits