bin_SCRIPTS		+= 		\
			%D%/syspathsubst

perllib_DATA		+=		\
			%D%/SysPathSubst.pm

CLEANFILES		+=			\
			%D%/syspathsubst.pl	\
			%D%/syspathsubst.pl.in	\
			%D%/SysPathSubst.pm	\
			%D%/SysPathSubst.pm.in

EXTRA_DIST		+=			\
			%D%/lib_head.pod.in	\
			%D%/prog_head.pod.in	\
			%D%/tail.pod.in		\
			%D%/templates.pod.in	\
			%D%/syspathsubst_pl.in	\
			%D%/syspathsubst.pod	\
			%D%/syspathsubst.pl.in	\
			%D%/SysPathSubst.pm.in

%D%/syspathsubst.pl.in: %D%/syspathsubst_pl.in %D%/syspathsubst.pod
	cat %D%/syspathsubst_pl.in %D%/syspathsubst.pod > $@

%D%/syspathsubst: %D%/syspathsubst.pl.in
	$(dosubst) < $< > $@
	chmod +x $@

%D%/SysPathSubst.pm.in: %D%/syspathsubst_pl.in %D%/SysPathSubst.3.pod
	cat %D%/syspathsubst_pl.in %D%/SysPathSubst.3.pod > $@

%C%_dist_manl_MANS = %D%/syspathsubst.l
%C%_dist_man3_MANS = %D%/SysPathSubst.3

%C%_POD_SFX = .pod
%C%_PODS = %D%/syspathsubst %D%/SysPathSubst.3
%C%_POD_PDF = %D%/syspathsubst.pdf
%C%_POD_HTML = %D%/syspathsubst.html

%C%_prog_pod_deps =				\
	%D%/prog_head.pod.in	\
	%D%/templates.pod.in	\
	%D%/tail.pod.in

%D%/syspathsubst.pod : $(%C%_prog_pod_deps)
	cat $(%C%_prog_pod_deps) | $(dosubst) > $@

%C%_lib_pod_deps =				\
	%D%/lib_head.pod.in	\
	%D%/templates.pod.in	\
	%D%/tail.pod.in

%D%/SysPathSubst.3.pod : $(%C%_lib_pod_deps)
	cat $(%C%_lib_pod_deps) | $(dosubst) > $@

install-exec-hook:
	cd $(DESTDIR)$(bindir) && \
	 rm -f xsyspathsubst$(EXEEXT) && \
	 $(LN_S) syspathsubst$(EXEEXT) xsyspathsubst$(EXEEXT)

include %D%/pod_all.mk
