Makefile.subdir 1.24 KB
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) scripts/_configurator.py
6 7 8
EXTRA_DIST += scripts/codes_configurator.py.in \
			  scripts/codes_filter_configs.py.in \
			  scripts/codes_config_get_vals.py.in \
9 10 11 12
			  scripts/configurator.py \
			  scripts/example/example.template \
			  scripts/example/params.py \
			  scripts/allocation_gen/config_alloc.conf \
13
			  scripts/allocation_gen/config_alloc-upd.conf \
14
			  scripts/allocation_gen/listgen.py \
15
			  scripts/allocation_gen/listgen-upd.py \
16
			  scripts/allocation_gen/README
17 18 19
CLEANFILES += $(my_bin_scripts)

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

22 23 24 25 26 27
.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
28 29 30
	$(do_subst) < $< > $@
	chmod +x $@

31 32 33
scripts/_configurator.py: scripts/configurator.py
	cp $^ $@

34 35
# install hook for configurator utility lib
# TODO: actually use the install program, use more of a 'standard' approach
36 37 38 39
#install-data-local:
#install -m 644 $(top_srcdir)/scripts/configurator.py $(libdir)
#uninstall-local:
#rm -f $(libdir)/configurator.py