<commit_before>
# $Id$
# $LastChangedBy$

NAME=elektra

DTDVERSION=0.1.0
SVNREP=http://germane-software.com/repositories/elektra


# Default dirs we use for installation, that can be substituted by the
# command line. See the README file or the RPM spec file.
BINDIR=/bin
UDIR=/usr
UBINDIR=$(UDIR)/bin
LIBDIR=/lib
ULIBDIR=$(UDIR)/lib
CONFDIR=/etc
INCDIR=$(UDIR)/include
DOCDIR=$(UDIR)/share/doc
MANDIR=$(UDIR)/share/man
SGMLDIR=$(UDIR)/share/sgml


DIRS=src doc dtd xmlschema





all: elektra.pc
	for x in ${DIRS}; do (cd "$$x"; $(MAKE) \
		OPTIMIZATIONS="${OPTIMIZATIONS}" \
		DTDVERSION=${DTDVERSION} \
		DOCDIR=${DOCDIR} MANDIR=${MANDIR} SGMLDIR=${SGMLDIR} \
		BINDIR=${BINDIR} LIBDIR=${LIBDIR} \
		UBINDIR=${UBINDIR} ULIBDIR=${ULIBDIR} \
		CONFDIR=${CONFDIR} INCDIR=${INCDIR} $@); done


cleanhere:
	-rm *~ elektra.spec elektra.pc svn-commit*
	-find . -name "*~" | xargs rm


clean: cleanhere
	for x in ${DIRS}; do (cd "$$x"; $(MAKE) $@); done

distclean: cleanhere
	for x in ${DIRS}; do (cd "$$x"; $(MAKE) $@); done


commit: clean
	cd ..; \
	svn ci elektra

vtag:
	PACK=`cat VERSION`;\
	svn cp ${SVNREP}/trunk ${SVNREP}/tags/$$PACK


dist: distclean elektra.spec
	# svn export wont work here...
	$(MAKE) -C doc docbookman   # leave mans already generated
	DIR=`basename \`pwd\``;\
	PACK=`cat VERSION`;\
	PACK=${NAME}-$$PACK;\
	cd ..;\
	ln -s $$DIR $$PACK;\
	tar --exclude .svn -czf $$PACK.tar.gz $$PACK/*;\
	rm $$PACK






rpmsig: dist
	VER=`cat VERSION`;\
	rpmbuild --sign -ta ../${NAME}-$$VER.tar.gz


rpm: dist
	VER=`cat VERSION`;\
	rpmbuild -ta ../${NAME}-$$VER.tar.gz


deb:
	dpkg-buildpackage -rfakeroot


elektra.spec: elektra.spec.in
	VERSION=`cat VERSION` ;\
	sed -e "s/_VERSION_/$$VERSION/g" < $< > $@ ;\
	cat ChangeLog >> $@

elektra.pc: elektra.pc.in
	VERSION=`cat VERSION` ;\
	PCUDIR=`echo $(UDIR) | sed -e "s,/,\\\/,g"` ;\
	PCLIBDIR=`echo $(LIBDIR) | sed -e "s,/,\\\/,g"` ;\
	cat $< | sed -e "s/_VERSION_/$$VERSION/g" |\
	sed -e "s,_UDIR_,$$PCUDIR,g" |\
	sed -e "s,_LIBDIR_,$$PCLIBDIR,g" > $@ ;



install: all
	[ -d "${DESTDIR}${LIBDIR}" ] || mkdir -p ${DESTDIR}${LIBDIR}
	[ -d "${DESTDIR}${ULIBDIR}" ] || mkdir -p ${DESTDIR}${ULIBDIR}
	[ -d "${DESTDIR}${ULIBDIR}/pkgconfig" ] || mkdir -p ${DESTDIR}${ULIBDIR}/pkgconfig
	[ -d "${DESTDIR}${BINDIR}" ] || mkdir -p ${DESTDIR}${BINDIR}
	[ -d "${DESTDIR}${INCDIR}" ] || mkdir -p ${DESTDIR}${INCDIR}
	[ -d "${DESTDIR}${CONFDIR}/profile.d" ] || mkdir -p ${DESTDIR}${CONFDIR}/profile.d
	[ -d "${DESTDIR}${DOCDIR}/${NAME}" ] || mkdir -p ${DESTDIR}${DOCDIR}/${NAME}
	[ -d "${DESTDIR}${DOCDIR}/${NAME}-devel" ] || mkdir -p ${DESTDIR}${DOCDIR}/${NAME}-devel
	for x in ${DIRS}; do (cd "$$x"; $(MAKE) DTDVERSION=${DTDVERSION} \
		DOCDIR=${DOCDIR} MANDIR=${MANDIR} SGMLDIR=${SGMLDIR} \
		BINDIR=${BINDIR} LIBDIR=${LIBDIR} \
		UBINDIR=${UBINDIR} ULIBDIR=${ULIBDIR} \
		CONFDIR=${CONFDIR} INCDIR=${INCDIR} $@); done
	cp scripts/elektraenv ${DESTDIR}${CONFDIR}/profile.d/elektraenv.sh
	chmod a+x example/*-convert
	cp elektra.pc ${DESTDIR}${ULIBDIR}/pkgconfig/elektra.pc
	cp LICENSE ${DESTDIR}${DOCDIR}/${NAME}
	cp ChangeLog ${DESTDIR}${DOCDIR}/${NAME}
	cp example/*-convert example/*.xml ${DESTDIR}${DOCDIR}/${NAME}
	cp example/*.c ${DESTDIR}${DOCDIR}/${NAME}-devel

<commit_msg>changed DTDVERSION to 0.1.1 added the "kdb set system/sw/kdb/current/schemapath" at the end so that kdb can retrieve the schema path without having it hardcoded in the source. <commit_after>
# $Id$
# $LastChangedBy$

NAME=elektra

DTDVERSION=0.1.1
SVNREP=http://germane-software.com/repositories/elektra


# Default dirs we use for installation, that can be substituted by the
# command line. See the README file or the RPM spec file.
BINDIR=/bin
UDIR=/usr
UBINDIR=$(UDIR)/bin
LIBDIR=/lib
ULIBDIR=$(UDIR)/lib
CONFDIR=/etc
INCDIR=$(UDIR)/include
DOCDIR=$(UDIR)/share/doc
MANDIR=$(UDIR)/share/man
SGMLDIR=$(UDIR)/share/sgml


DIRS=src doc dtd xmlschema





all: elektra.pc
	for x in ${DIRS}; do (cd "$$x"; $(MAKE) \
		OPTIMIZATIONS="${OPTIMIZATIONS}" \
		DTDVERSION=${DTDVERSION} \
		DOCDIR=${DOCDIR} MANDIR=${MANDIR} SGMLDIR=${SGMLDIR} \
		BINDIR=${BINDIR} LIBDIR=${LIBDIR} \
		UBINDIR=${UBINDIR} ULIBDIR=${ULIBDIR} \
		CONFDIR=${CONFDIR} INCDIR=${INCDIR} $@); done


cleanhere:
	-rm *~ elektra.spec elektra.pc svn-commit*
	-find . -name "*~" | xargs rm


clean: cleanhere
	for x in ${DIRS}; do (cd "$$x"; $(MAKE) $@); done

distclean: cleanhere
	for x in ${DIRS}; do (cd "$$x"; $(MAKE) $@); done


commit: clean
	cd ..; \
	svn ci elektra

vtag:
	PACK=`cat VERSION`;\
	svn cp ${SVNREP}/trunk ${SVNREP}/tags/$$PACK


dist: distclean elektra.spec
	# svn export wont work here...
	$(MAKE) -C doc docbookman   # leave mans already generated
	DIR=`basename \`pwd\``;\
	PACK=`cat VERSION`;\
	PACK=${NAME}-$$PACK;\
	cd ..;\
	ln -s $$DIR $$PACK;\
	tar --exclude .svn -czf $$PACK.tar.gz $$PACK/*;\
	rm $$PACK






rpmsig: dist
	VER=`cat VERSION`;\
	rpmbuild --sign -ta ../${NAME}-$$VER.tar.gz


rpm: dist
	VER=`cat VERSION`;\
	rpmbuild -ta ../${NAME}-$$VER.tar.gz


deb:
	dpkg-buildpackage -rfakeroot


elektra.spec: elektra.spec.in
	VERSION=`cat VERSION` ;\
	sed -e "s/_VERSION_/$$VERSION/g" < $< > $@ ;\
	cat ChangeLog >> $@

elektra.pc: elektra.pc.in
	VERSION=`cat VERSION` ;\
	PCUDIR=`echo $(UDIR) | sed -e "s,/,\\\/,g"` ;\
	PCLIBDIR=`echo $(LIBDIR) | sed -e "s,/,\\\/,g"` ;\
	cat $< | sed -e "s/_VERSION_/$$VERSION/g" |\
	sed -e "s,_UDIR_,$$PCUDIR,g" |\
	sed -e "s,_LIBDIR_,$$PCLIBDIR,g" > $@ ;



install: all
	[ -d "${DESTDIR}${LIBDIR}" ] || mkdir -p ${DESTDIR}${LIBDIR}
	[ -d "${DESTDIR}${ULIBDIR}" ] || mkdir -p ${DESTDIR}${ULIBDIR}
	[ -d "${DESTDIR}${ULIBDIR}/pkgconfig" ] || mkdir -p ${DESTDIR}${ULIBDIR}/pkgconfig
	[ -d "${DESTDIR}${BINDIR}" ] || mkdir -p ${DESTDIR}${BINDIR}
	[ -d "${DESTDIR}${INCDIR}" ] || mkdir -p ${DESTDIR}${INCDIR}
	[ -d "${DESTDIR}${CONFDIR}/profile.d" ] || mkdir -p ${DESTDIR}${CONFDIR}/profile.d
	[ -d "${DESTDIR}${DOCDIR}/${NAME}" ] || mkdir -p ${DESTDIR}${DOCDIR}/${NAME}
	[ -d "${DESTDIR}${DOCDIR}/${NAME}-devel" ] || mkdir -p ${DESTDIR}${DOCDIR}/${NAME}-devel
	for x in ${DIRS}; do (cd "$$x"; $(MAKE) DTDVERSION=${DTDVERSION} \
		DOCDIR=${DOCDIR} MANDIR=${MANDIR} SGMLDIR=${SGMLDIR} \
		BINDIR=${BINDIR} LIBDIR=${LIBDIR} \
		UBINDIR=${UBINDIR} ULIBDIR=${ULIBDIR} \
		CONFDIR=${CONFDIR} INCDIR=${INCDIR} $@); done
	cp scripts/elektraenv ${DESTDIR}${CONFDIR}/profile.d/elektraenv.sh
	chmod a+x example/*-convert
	cp elektra.pc ${DESTDIR}${ULIBDIR}/pkgconfig/elektra.pc
	cp LICENSE ${DESTDIR}${DOCDIR}/${NAME}
	cp ChangeLog ${DESTDIR}${DOCDIR}/${NAME}
	cp example/*-convert example/*.xml ${DESTDIR}${DOCDIR}/${NAME}
	cp example/*.c ${DESTDIR}${DOCDIR}/${NAME}-devel
	kdb set system/sw/kdb/current/schemapath "${DESTDIR}${SGMLDIR}/elektra-${DTDVERSION}/elektra.xsd"

{'fraction_non_alphanumeric': 0.22671222700935967, 'fraction_numerical': 0.0013370970138166691, 'mean_word_length': 4.127189642041127, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '1801728', 'n_tokens_mistral': 3010, 'n_tokens_neox': 2869, 'n_words': 585}