bin_SCRIPTS		+=			\
			%D%/compact_path	\
			%D%/mst_envs		\
			%D%/perldoc		\
			%D%/perl		\
			%D%/mst-cpan		\
			%D%/python		\
			%D%/python2		\
			%D%/python3

DISTCLEANFILES		+=			\
			%D%/compact_path	\
			%D%/mst-cpan		\
			%D%/mst-cpan.bot	\
			%D%/mst-cpan.top	\
			%D%/mst_envs		\
			%D%/mst_envs.pl		\
			%D%/perl		\
			%D%/perl.bot		\
			%D%/perl.top		\
			%D%/perldoc		\
			%D%/python		\
			%D%/python.bot		\
			%D%/python.top		\
			%D%/python2		\
			%D%/python2.bot		\
			%D%/python2.top		\
			%D%/python3		\
			%D%/python3.bot		\
			%D%/python3.top

EXTRA_DIST		+=			\
			%D%/compact_path.pl.in	\
			%D%/mst_envs.pl.in	\
			%D%/perldoc.in		\
			%D%/perl.bot.in		\
			%D%/perl.top.in		\
			%D%/python.bot.in	\
			%D%/python.top.in	\
			%D%/python2.bot.in	\
			%D%/python2.top.in	\
			%D%/python3.bot.in	\
			%D%/python3.top.in	\
			%D%/mst-cpan.bot.in	\
			%D%/mst-cpan.top.in


# need to find MST_Env.pm
PERLFLAGS=-I$(top_builddir)/mst_envs

ASSEMBLED =					\
		%D%/mst-cpan			\
		%D%/python			\
		%D%/python2			\
		%D%/python3			\
		%D%/perl


$(ASSEMBLED) : % : %.top $(top_builddir)/share/mst_envs.sh %.bot
	cat $@.top $(top_builddir)/share/mst_envs.sh $@.bot > $@
	chmod +x $@


# install wrapclean scripts
WRAPCLEAN = python python2 python3 perl
install-exec-hook :
	cd $(DESTDIR)$(bindir)			;	\
	for bin in $(WRAPCLEAN)  ; do			\
	   rm -f $${bin}clean			;	\
	   $(LN_S) $${bin} $${bin}clean		;	\
	done

uninstall-hook :
	cd $(DESTDIR)$(BINDIR)/			;	\
	for bin in $(WRAPCLEAN)  ; do			\
	   rm -f $${bin}clean			;	\
	done

%C%_POD_SFX = .pl
%C%_PODS = %D%/mst_envs

%C%_POD_HTML = %D%/mst_envs.html
%C%_POD_PDF  = %D%/mst_envs.pdf


%C%_dist_manl_MANS = %D%/mst_envs.l
include %D%/pod_all.mk
