<commit_before>#
# $Id$
#

OUTPUT=output
CONTENT=output/content
TARGET=/home/httpd/xp.php3.de/doc_root/
XML=xml
CTREE=$(XML)/classTree.xpdoc.xml
INHERITANCE=$(XML)/inheritanceTree.xml
SABCMD=sabcmd 
SABPHP=php -C -q util/sabcmd.php
PHP=php -q
PUBLISH=/tmp/xpdoc.tgz
CVSROOT=/home/cvs/repositories/xp/
XPROOT=/usr/local/lib/xp/

.PHONY: all clean install xml content $(TARGET)

default: usage
all: clean makexml gen install

usage:
	@echo "Usage: make <target>"
	@echo "            makexml - generate the xml-files out of the source"
	@echo "            gen     - apply xslt on the xml files"
	@echo "            install - install generated html in $(TARGET)"
	@echo "            clean   - remove all generated files (xml/html)"
	@echo "            all     - calls 'clean makexml gen install' in this order"
	@echo "            publish - publishes generated content"
	@echo "                      example: make publish target=user@host"
	@echo "            cvshist - updates CVS history XML file"
	@echo "                      example: make cvshist from=user@host"
	@echo "            release - makes release tarball"
	@echo "                      example: make release"
	@echo "                      example: make release at=user@host"
	@echo ""

release:
ifeq ($(at),)
	cd $(XPROOT)
	cvs update -dP 
	cd .. 
	tar cvfz $(TARGET)downloads/xp-`date +%Y-%m-%d`.tar.gz --exclude=CVS xp
	cd $(TARGET)downloads/
	ln -s xp-`date +%Y-%m-%d`.tar.gz xp-current.tar.gz
else
	ssh $(at) \
	  cd $(XPROOT) \; \
	  cvs update -dP \; \
	  cd .. \; \
	  tar cvfz $(TARGET)downloads/xp-`date +%Y-%m-%d`.tar.gz --exclude=CVS xp \; \
	  cd $(TARGET)downloads/ \; \
	  ln -s xp-`date +%Y-%m-%d`.tar.gz xp-current.tar.gz
endif

cvshist:
ifeq ($(from),)
	@echo "*** Please specify from what host to retrieve CVS history file"
else
	ssh $(from) cat $(CVSROOT)/CVSROOT/history | $(PHP) util/history.php php://stdin > src/cvs_history.xml
	-cvs diff -u src/cvs_history.xml
	#cvs com -m '- Auto-updated from CVS history file' src/cvs_history.xml
endif

publish:
ifeq ($(target),)
	@echo "*** Please specify a target"
else
	cd $(TARGET) ; tar cfz $(PUBLISH) *
	scp $(PUBLISH) $(target):$(TARGET)
	ssh $(target) cd $(TARGET) \; tar xfz xpdoc.tgz
	scp content/news.rdf.xml $(target):$(TARGET)
	rm $(PUBLISH)
endif

$(XML):
	-mkdir $(XML)
<commit_msg>- Remove link before creating it to suppress warning - Create MD5 checksum<commit_after>#
# $Id$
#

OUTPUT=output
CONTENT=output/content
TARGET=/home/httpd/xp.php3.de/doc_root/
XML=xml
CTREE=$(XML)/classTree.xpdoc.xml
INHERITANCE=$(XML)/inheritanceTree.xml
SABCMD=sabcmd 
SABPHP=php -C -q util/sabcmd.php
PHP=php -q
PUBLISH=/tmp/xpdoc.tgz
CVSROOT=/home/cvs/repositories/xp/
XPROOT=/usr/local/lib/xp/

.PHONY: all clean install xml content $(TARGET)

default: usage
all: clean makexml gen install

usage:
	@echo "Usage: make <target>"
	@echo "            makexml - generate the xml-files out of the source"
	@echo "            gen     - apply xslt on the xml files"
	@echo "            install - install generated html in $(TARGET)"
	@echo "            clean   - remove all generated files (xml/html)"
	@echo "            all     - calls 'clean makexml gen install' in this order"
	@echo "            publish - publishes generated content"
	@echo "                      example: make publish target=user@host"
	@echo "            cvshist - updates CVS history XML file"
	@echo "                      example: make cvshist from=user@host"
	@echo "            release - makes release tarball"
	@echo "                      example: make release"
	@echo "                      example: make release at=user@host"
	@echo ""

release:
ifeq ($(at),)
	cd $(XPROOT)
	cvs update -dP 
	cd .. 
	tar cvfz $(TARGET)downloads/xp-`date +%Y-%m-%d`.tar.gz --exclude=CVS xp
	cd $(TARGET)downloads/
	rm xp-current.tar.gz
	ln -s xp-`date +%Y-%m-%d`.tar.gz xp-current.tar.gz
	md5 -q xp-`date +%Y-%m-%d`.tar.gz > xp-`date +%Y-%m-%d`.md5
else
	ssh $(at) \
	  cd $(XPROOT) \; \
	  cvs update -dP \; \
	  cd .. \; \
	  tar cvfz $(TARGET)downloads/xp-`date +%Y-%m-%d`.tar.gz --exclude=CVS xp \; \
	  cd $(TARGET)downloads/ \; \
	  rm xp-current.tar.gz \; \
	  ln -s xp-`date +%Y-%m-%d`.tar.gz xp-current.tar.gz \; \
	  md5 -q xp-`date +%Y-%m-%d`.tar.gz \> xp-`date +%Y-%m-%d`.md5
endif

cvshist:
ifeq ($(from),)
	@echo "*** Please specify from what host to retrieve CVS history file"
else
	ssh $(from) cat $(CVSROOT)/CVSROOT/history | $(PHP) util/history.php php://stdin > src/cvs_history.xml
	-cvs diff -u src/cvs_history.xml
	#cvs com -m '- Auto-updated from CVS history file' src/cvs_history.xml
endif

publish:
ifeq ($(target),)
	@echo "*** Please specify a target"
else
	cd $(TARGET) ; tar cfz $(PUBLISH) *
	scp $(PUBLISH) $(target):$(TARGET)
	ssh $(target) cd $(TARGET) \; tar xfz xpdoc.tgz
	scp content/news.rdf.xml $(target):$(TARGET)
	rm $(PUBLISH)
endif

$(XML):
	-mkdir $(XML)

{'fraction_non_alphanumeric': 0.15799180327868853, 'fraction_numerical': 0.0014344262295081967, 'mean_word_length': 2.62630014858841, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 28}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2185265', 'n_tokens_mistral': 1868, 'n_tokens_neox': 1791, 'n_words': 487}