<commit_before>#
# Copyright (c) 2006 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.opensource.org/licenses/cpl.php.
#
# This program is distributed in the hope that it will be useful, but
# without any warranty; without even the implied warranty of merchantability
# or fitness for a particular purpose. See the Common Public License for
# full details.
#

all: default-subdirs default-all

export TOPDIR = $(shell pwd)
export DISTDIR = $(TOPDIR)/rmake-$(VERSION)

SUBDIRS=rmake commands extra man

extra_files = \
	Make.rules 		\
	Makefile		\
	Make.defs		\
	NEWS			\
	LICENSE

dist_files = $(extra_files)

.PHONY: clean dist install subdirs

subdirs: default-subdirs

install: install-subdirs

clean: clean-subdirs default-clean

extra/rmake.recipe:
	cd extra; $(MAKE) rmake.recipe

infoccs: info-rmake-1.ccs info-rmake-chroot-1.ccs

info-rmake-1.ccs:
	cvc cook extra/info-rmake.recipe

info-rmake-chroot-1.ccs:
	cvc cook extra/info-rmake-chroot.recipe

ccs: dist extra/rmake.recipe infoccs
	rm -f rmake*.ccs
	rm -f extra/rmake.recipe
	cd extra;  $(MAKE) rmake.recipe
	cvc cook extra/rmake.recipe

dist:
	if ! grep "^Changes in $(VERSION)" NEWS > /dev/null 2>&1; then \
		echo "no NEWS entry"; \
		exit 1; \
	fi
	$(MAKE) forcedist


forcedist: $(dist_files)
	rm -rf $(DISTDIR)
	mkdir $(DISTDIR)
	for d in $(SUBDIRS); do make -C $$d DIR=$$d dist || exit 1; done
	for f in $(dist_files); do \
		mkdir -p $(DISTDIR)/`dirname $$f`; \
		cp -a $$f $(DISTDIR)/$$f; \
	done; \
	tar cjf $(DISTDIR).tar.bz2 `basename $(DISTDIR)`
	@echo "=== sanity building/testing rmake ==="; \
	cd $(DISTDIR); \
	make > /dev/null; \
	./bin/rmake --version > /dev/null || echo "RMAKE DOES NOT WORK"; \
	cd -; \
	rm -rf $(DISTDIR)

tag:
	hg tag rmake-$(VERSION)

clean: clean-subdirs default-clean

test: all
	if [ `id -u` ] ; then \
		if [ -f /usr/bin/sudo ] ; then \
			SUDO="sudo bash -c"; \
		else \
			SUDO="su -c" ;\
		fi; \
	else \
		SUDO=bash -c ;\
	fi ;\
	$${SUDO} 'chown root.root commands/chroothelper; \
		  chmod 4755 commands/chroothelper'

include Make.rules
include Make.defs
 
# vim: set sts=8 sw=8 noexpandtab :<commit_msg>Fix makefile to break up forcedist into archive and sanitycheck steps.<commit_after>#
# Copyright (c) 2006 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.opensource.org/licenses/cpl.php.
#
# This program is distributed in the hope that it will be useful, but
# without any warranty; without even the implied warranty of merchantability
# or fitness for a particular purpose. See the Common Public License for
# full details.
#

all: default-subdirs default-all

export TOPDIR = $(shell pwd)
export DISTDIR = $(TOPDIR)/rmake-$(VERSION)

SUBDIRS=rmake commands extra man

extra_files = \
	Make.rules 		\
	Makefile		\
	Make.defs		\
	NEWS			\
	LICENSE

dist_files = $(extra_files)

.PHONY: clean dist install subdirs

subdirs: default-subdirs

install: install-subdirs

clean: clean-subdirs default-clean

extra/rmake.recipe:
	cd extra; $(MAKE) rmake.recipe

infoccs: info-rmake-1.ccs info-rmake-chroot-1.ccs

info-rmake-1.ccs:
	cvc cook extra/info-rmake.recipe

info-rmake-chroot-1.ccs:
	cvc cook extra/info-rmake-chroot.recipe

ccs: dist extra/rmake.recipe infoccs
	rm -f rmake*.ccs
	rm -f extra/rmake.recipe
	cd extra;  $(MAKE) rmake.recipe
	cvc cook extra/rmake.recipe

dist:
	if ! grep "^Changes in $(VERSION)" NEWS > /dev/null 2>&1; then \
		echo "no NEWS entry"; \
		exit 1; \
	fi
	$(MAKE) forcedist


archive: $(dist_files)
	rm -rf $(DISTDIR)
	mkdir $(DISTDIR)
	for d in $(SUBDIRS); do make -C $$d DIR=$$d dist || exit 1; done
	for f in $(dist_files); do \
		mkdir -p $(DISTDIR)/`dirname $$f`; \
		cp -a $$f $(DISTDIR)/$$f; \
	done; \
	tar cjf $(DISTDIR).tar.bz2 `basename $(DISTDIR)`

sanitycheck: archive
	@echo "=== sanity building/testing rmake ==="; \
	cd $(DISTDIR); \
	make > /dev/null || exit 1; \
	./bin/rmake --version > /dev/null || echo "RMAKE DOES NOT WORK" || exit 1; \
	cd -; \
	rm -rf $(DISTDIR)

forcedist: archive sanitycheck

tag:
	hg tag rmake-$(VERSION)

clean: clean-subdirs default-clean

test: all
	if [ `id -u` ] ; then \
		if [ -f /usr/bin/sudo ] ; then \
			SUDO="sudo bash -c"; \
		else \
			SUDO="su -c" ;\
		fi; \
	else \
		SUDO=bash -c ;\
	fi ;\
	$${SUDO} 'chown root.root commands/chroothelper; \
		  chmod 4755 commands/chroothelper'

include Make.rules
include Make.defs
 
# vim: set sts=8 sw=8 noexpandtab :
{'fraction_non_alphanumeric': 0.13331951067800124, 'fraction_numerical': 0.009122952519178934, 'mean_word_length': 3.310991957104558, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1604025', 'n_tokens_mistral': 1929, 'n_tokens_neox': 1812, 'n_words': 571}