<commit_before>## -*- coding: windows-1252 -*- 
##  COPYRIGHT (C) PLANISWARE 2016
##
##  All Rights Reserved
##
##  This program and the information contained herein are confidential to
##  and the property of PLANISWARE and are made available only to PLANISWARE
##  employees for the sole purpose of conducting PLANISWARE business.
##
##**************************************************************************
ZIP=/usr/bin/zip -q

SRC_DIR = src
DIST_DIR = dist
ZIP_DIR = zip
ELI_DIR = ../eli
EL_DIR = ../el

ifdef VERSION
	# do nothing
else ifdef BUILD_NUMBER
    VERSION = "incremental-${BUILD_NUMBER}"
else 
    VERSION = "incremental-$(shell git describe --tags)"
endif

ZIPFILE="emacs-runtime-${VERSION}.zip"

ZIPTMPDIR=/tmp/runtime_`whoami`

clean:
	rm -rf ${DIST_DIR}
	rm -rf ${ZIP_DIR}

init: clean
	mkdir -p ${DIST_DIR}    
	mkdir -p ${ZIP_DIR}    

copyfiles:
	@@echo "Building emacs runtime"

	@@echo "Copying source files"
	@@cp -r ${SRC_DIR}/* ${DIST_DIR}

	@@echo "Copying eli files"
	@@mkdir -p ${DIST_DIR}/eli
	@@cp -r ${ELI_DIR}/* ${DIST_DIR}/eli

	@@echo "Copying required patches"
	@@sh ./el/copypatches.sh ${DIST_DIR}/patches/

	@@echo "Copying el files"
	@@sh ./el/copyfiles.sh ${DIST_DIR}/devenv/

	@@echo "Adding version.txt"
	@@echo ${VERSION} > ${DIST_DIR}/version.txt
	@@echo $(shell git describe --tags --abbrev=20) >> ${DIST_DIR}/version.txt

buildzip:
	@@echo "Zip files to ${ZIPFILE}"
	@@mkdir -p ${ZIPTMPDIR}
	@@rm -rf ${ZIPTMPDIR}
	@@mkdir -p ${ZIPTMPDIR}
	@@cp -r dist/* ${ZIPTMPDIR}
	@@cd ${ZIPTMPDIR}; ${ZIP} -r ${ZIPFILE} * -x \*CVS\*
	@@echo "Move zip file to ${ZIP_DIR}."
	@@mv ${ZIPTMPDIR}/${ZIPFILE} ${ZIP_DIR}

zip: init copyfiles buildzip<commit_msg>windows friendly makefile and make env<commit_after>## -*- coding: windows-1252 -*- 
##  COPYRIGHT (C) PLANISWARE 2016
##
##  All Rights Reserved
##
##  This program and the information contained herein are confidential to
##  and the property of PLANISWARE and are made available only to PLANISWARE
##  employees for the sole purpose of conducting PLANISWARE business.
##
##**************************************************************************
ZIP=/usr/bin/zip -q

SRC_DIR = src
DIST_DIR = dist
ZIP_DIR = zip
ELI_DIR = ../eli
EL_DIR = ../el

ifdef VERSION
	# do nothing
else ifdef BUILD_NUMBER
    VERSION = "incremental-${BUILD_NUMBER}"
else 
    VERSION = "incremental-$(shell git describe --tags)"
endif

ZIPFILE="emacs-runtime-${VERSION}.zip"

ZIPTMPDIR=/tmp/runtime_`whoami`

clean:
	@@rm -rf ${DIST_DIR}

init: 
	@@test -d ${DIST_DIR} || mkdir ${DIST_DIR}
	@@test -d ${DIST_DIR}/devenv/ || mkdir ${DIST_DIR}/devenv/
	@@test -d ${DIST_DIR}/devenv/el || mkdir ${DIST_DIR}/devenv/el

copyfiles:
	@@echo "Building emacs runtime"

	@@echo "Copying source files"
	@@cp -r ${SRC_DIR}/* ${DIST_DIR}

	@@echo "Copying eli files"
#@@mkdir ${DIST_DIR}/eli
	@@cp -r ${ELI_DIR} ${DIST_DIR}

	@@echo "copying el files"
	@@cp -r ${EL_DIR}/* ${DIST_DIR}/devenv/el
	@@cp -r ../emacs-plw-ext.el ${DIST_DIR}/devenv/
#	@@sh ./el/copyfiles.sh ${dist_dir}/devenv/

patches:
	@@echo "copying required patches"
	@@sh ./el/copypatches.sh ${DIST_DIR}/patches/

version:
	@@echo "adding version.txt"
	@@echo ${VERSION} > ${DIST_DIR}/version.txt
	@@echo $(shell git describe --tags --abbrev=20) >> ${DIST_DIR}/version.txt

buildzip:
	@@rm -rf ${ZIP_DIR}
	@@mkdir -p ${ZIP_DIR}    
	@@echo "zip files to ${ZIPFILE}"
	@@rm -rf ${ZIPTMPDIR}
	@@mkdir -p ${ZIPTMPDIR}
	@@cp -r dist/* ${ZIPTMPDIR}
	@@cd ${ZIPTMPDIR}; ${ZIP} -r ${ZIPFILE} * -x \*cvs\*
	@@echo "move zip file to ${ZIP_DIR}."
	@@mv ${ZIPTMPDIR}/${ZIPFILE} ${ZIP_DIR}

zip: clean init copyfiles patches version buildzip

env: init copyfiles
{'fraction_non_alphanumeric': 0.20973884657236128, 'fraction_numerical': 0.00544069640914037, 'mean_word_length': 4.200848656294201, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2832451', 'n_tokens_mistral': 1440, 'n_tokens_neox': 1355, 'n_words': 379}