Makefile.subdir 872 Bytes
Newer Older
1 2 3 4
my_bin_scripts = scripts/codes_configurator \
			   scripts/codes_filter_configs \
			   scripts/codes_config_get_vals

5
bin_SCRIPTS += $(my_bin_scripts) 
6 7 8 9
EXTRA_DIST += scripts/codes_configurator.py.in \
			  scripts/codes_filter_configs.py.in \
			  scripts/codes_config_get_vals.py.in \
			  scripts/configurator.py
10 11 12 13 14
CLEANFILES += $(my_bin_scripts)

# manual rules for now
do_subst = sed -e 's![@]libdir[@]!$(libdir)!g'

15 16 17 18 19 20
.PHONY: scriptdir
# need to ensure that the scripts directory exists before running the sub cmd
scriptdir:
	test -d scripts || mkdir scripts

%: %.py.in Makefile scriptdir
21 22 23 24 25 26 27 28 29
	$(do_subst) < $< > $@
	chmod +x $@

# install hook for configurator utility lib
# TODO: actually use the install program, use more of a 'standard' approach
install-data-local:
	cp $(top_srcdir)/scripts/configurator.py $(libdir)
uninstall-local:
	rm -f $(libdir)/configurator.py