# This needs GNU make. Sigh. # Make rules for www.python.org ht->html conversion, also does report # of checked-out files. #/usr/local/bin necessary for ht2html /bin/env to find python PATH = $(shell echo "$$PATH:/depot/sundry/plat/bin") # SOURCES indirection filters out "*.ht" value when no ht files are around. SOURCES = $(shell echo *.ht) TARGETS = $(filter-out *.html,$(SOURCES:%.ht=%.html)) $(EXTRA_TARGETS) RCSADMIN = $(shell echo RCS/*,v) RCSFILES = $(RCSADMIN:RCS/%,v=%) RSYNC_RSH = ssh -i /projects/python/python.org/psa/.ssh/identity -l psa LIVE_HOST = parrot.python.org LIVE_ACCOUNT = psa LIVE_ROOT = /local/ftp/pub/www.python.org LIVE_DEST = $(LIVE_ACCOUNT)@$(LIVE_HOST):$(LIVE_ROOT)/$(ROOT_OFFSET) GLOBAL_EXCLUDES = --exclude-from /projects/python/python.org/ftp/pub/www.python.org/scripts/rsync-excludes # If the file .rsync-excludes exists in the make dir, use it. EXCLUDE_FROM = $(shell if [ -f .rsync-excludes ]; then \ echo "--exclude-from .rsync-excludes"; \ else \ echo ""; \ fi) ROOT_DIR = /projects/python/python.org/ftp/pub/www.python.org SCRIPTDIR = $(ROOT_DIR)/scripts # HT2HTML = $(SCRIPTDIR)/ht2html.py HT2HTML = ht2html.py HTFLAGS = -r -f ROOT_OFFSET = . HTRELDIR = . .SUFFIXES: .ht .html .ht.html: $(HT2HTML) $(HTFLAGS) $(HTRELDIR)/$< @find $< -newer $@ \ -exec sh -c "echo '($<: no effective changes)'; touch $@" \; all: $(TARGETS) locked # $(TARGETS): $(HT2HTML) clean: -rm -f *~ install: all @echo Push to $(LIVE_DEST) ... @rsync -v --rsh "$(RSYNC_RSH)" --archive --update --delete $(GLOBAL_EXCLUDES) $(EXCLUDE_FROM) ./ $(LIVE_DEST) # Identify which and who has locked files: # (Nested 'if' so this works with both solaris II and gnu make.) locked: @if [ "$(RCSFILES)" != "*" ]; then \ rlog -L -h -l $(RCSFILES) | (egrep "^( |Working file:)" || true) \ ; fi