<commit_before>include config.mk

all: build-src build-man

build-src:
	@${MAKE} -C src

build-man:
	@${MAKE} -C man

test: all
	@PACKAGE=${PACKAGE} prove test

test-x11: all
	test/run-interactive
	prove test/feh-bg.i

install: install-man install-doc install-bin install-font install-img
install: install-examples

install-man:
	@echo installing manuals to ${man_dir}
	@mkdir -p ${man_dir}/man1
	@cp man/*.1 ${man_dir}/man1
	@chmod 644 ${man_dir}/man1/feh.1 ${man_dir}/man1/feh-cam.1 \
		${man_dir}/man1/gen-cam-menu.1

install-doc:
	@echo installing docs to ${doc_dir}
	@mkdir -p ${doc_dir}
	@cp AUTHORS ChangeLog README TODO ${doc_dir}
	@chmod 644 ${doc_dir}/*

install-bin:
	@echo installing executables to ${bin_dir}
	@mkdir -p ${bin_dir}
	@cp src/feh cam/feh-cam cam/gen-cam-menu ${bin_dir}
	@chmod 755 ${bin_dir}/feh ${bin_dir}/feh-cam \
		${bin_dir}/gen-cam-menu

install-font:
	@echo installing fonts to ${font_dir}
	@mkdir -p ${font_dir}
	@cp share/fonts/* ${font_dir}
	@chmod 644 ${font_dir}/*

install-img:
	@echo installing images to ${image_dir}
	@mkdir -p ${image_dir}
	@cp share/images/* ${image_dir}
	@chmod 644 ${image_dir}/*

install-examples:
	@echo installing examples to ${example_dir}
	@mkdir -p ${example_dir}
	@cp examples/* ${example_dir}
	@chmod 644 ${example_dir}/*


uninstall:
	rm -f ${man_dir}/man1/feh.1 ${man_dir}/man1/feh-cam.1
	rm -f ${man_dir}/man1/gen-cam-menu.1
	rm -rf ${doc_dir}<commit_msg>Fixed install script for repeated installs.<commit_after>include config.mk

all: build-src build-man

build-src:
	@${MAKE} -C src

build-man:
	@${MAKE} -C man

test: all
	@PACKAGE=${PACKAGE} prove test

test-x11: all
	test/run-interactive
	prove test/feh-bg.i

install: install-man install-doc install-bin install-font install-img
install: install-examples

install-man:
	@echo installing manuals to ${man_dir}
	@mkdir -p ${man_dir}/man1
	@cp man/*.1 ${man_dir}/man1
	@chmod 644 ${man_dir}/man1/feh.1 ${man_dir}/man1/feh-cam.1 \
		${man_dir}/man1/gen-cam-menu.1

install-doc:
	@echo installing docs to ${doc_dir}
	@mkdir -p ${doc_dir}
	@cp AUTHORS ChangeLog README TODO ${doc_dir}
	@chmod 644 ${doc_dir}/AUTHORS ${doc_dir}/ChangeLog ${doc_dir}/README \
		${doc_dir}/TODO

install-bin:
	@echo installing executables to ${bin_dir}
	@mkdir -p ${bin_dir}
	@cp src/feh cam/feh-cam cam/gen-cam-menu ${bin_dir}
	@chmod 755 ${bin_dir}/feh ${bin_dir}/feh-cam \
		${bin_dir}/gen-cam-menu

install-font:
	@echo installing fonts to ${font_dir}
	@mkdir -p ${font_dir}
	@cp share/fonts/* ${font_dir}
	@chmod 644 ${font_dir}/*

install-img:
	@echo installing images to ${image_dir}
	@mkdir -p ${image_dir}
	@cp share/images/* ${image_dir}
	@chmod 644 ${image_dir}/*

install-examples:
	@echo installing examples to ${example_dir}
	@mkdir -p ${example_dir}
	@cp examples/* ${example_dir}
	@chmod 644 ${example_dir}/*


uninstall:
	rm -f ${man_dir}/man1/feh.1 ${man_dir}/man1/feh-cam.1
	rm -f ${man_dir}/man1/gen-cam-menu.1
	rm -rf ${doc_dir}
{'fraction_non_alphanumeric': 0.1688663282571912, 'fraction_numerical': 0.023688663282571912, 'mean_word_length': 4.176882661996498, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5148271', 'n_tokens_mistral': 1299, 'n_tokens_neox': 1224, 'n_words': 289}