2001-12-24 09:57:46 -05:00
|
|
|
## Process this file with Automake to produce Makefile.in
|
|
|
|
|
2011-11-21 08:59:36 -05:00
|
|
|
dist_bin_SCRIPTS = bin/stow bin/chkstow
|
|
|
|
info_TEXINFOS = doc/stow.texi
|
|
|
|
dist_man_MANS = doc/stow.8
|
2011-11-24 12:33:36 -05:00
|
|
|
dist_doc_DATA = README doc/manual.html doc/manual.pdf
|
2011-11-24 11:28:09 -05:00
|
|
|
pmdir = $(libdir)/perl5
|
2011-11-21 08:59:36 -05:00
|
|
|
dist_pm_DATA = lib/Stow.pm
|
|
|
|
pmstowdir = $(pmdir)/Stow
|
|
|
|
dist_pmstow_DATA = lib/Stow/Util.pm
|
2011-11-16 09:04:03 -05:00
|
|
|
|
2011-11-24 12:33:36 -05:00
|
|
|
TEXINFO_TEX = doc/texinfo.tex
|
|
|
|
export TEXI2DVI_BUILD_MODE = clean
|
|
|
|
|
2011-11-23 18:45:48 -05:00
|
|
|
DEFAULT_IGNORE_LIST = default-ignore-list
|
|
|
|
|
2011-11-16 09:04:03 -05:00
|
|
|
TESTS_ENVIRONMENT=$(PERL) -I $(top_srcdir)
|
|
|
|
TESTS = \
|
|
|
|
t/cleanup_invalid_links.t \
|
|
|
|
t/defer.t \
|
|
|
|
t/examples.t \
|
|
|
|
t/find_stowed_path.t \
|
|
|
|
t/foldable.t \
|
2011-11-23 18:45:48 -05:00
|
|
|
t/ignore.t \
|
2011-11-16 09:04:03 -05:00
|
|
|
t/parent.t \
|
|
|
|
t/stow_contents.t \
|
|
|
|
t/stow.t \
|
|
|
|
t/unstow_contents_orig.t \
|
|
|
|
t/unstow_contents.t \
|
|
|
|
t/chkstow.t
|
|
|
|
|
|
|
|
AUTOMAKE_OPTIONS = dist-shar
|
2011-11-21 08:59:36 -05:00
|
|
|
CPAN_FILES = MANIFEST MANIFEST.SKIP Build.PL META.yml META.json
|
|
|
|
EXTRA_DIST = \
|
|
|
|
bin/stow.in bin/chkstow.in lib/Stow.pm.in \
|
|
|
|
$(TESTS) t/testutil.pm \
|
|
|
|
$(TEXINFO_TEX) \
|
2011-11-23 18:45:48 -05:00
|
|
|
default-ignore-list \
|
2011-11-21 08:59:36 -05:00
|
|
|
$(CPAN_FILES)
|
|
|
|
CLEANFILES = $(bin_SCRIPTS) $(dist_pm_DATA)
|
2011-11-16 09:04:03 -05:00
|
|
|
|
|
|
|
# clean up files left behind by test suite
|
|
|
|
clean-local:
|
2011-11-24 12:33:36 -05:00
|
|
|
-rm -rf t/target t/stow \
|
|
|
|
bin/stow bin/chkstow doc/stow.8 ChangeLog \
|
|
|
|
doc/manual.*
|
2011-11-16 09:04:03 -05:00
|
|
|
|
|
|
|
# this is more explicit and reliable than the config file trick
|
|
|
|
edit = sed -e 's|[@]PERL[@]|$(PERL)|g' \
|
2011-11-18 10:09:39 -05:00
|
|
|
-e 's|[@]VERSION[@]|$(VERSION)|g'
|
2011-11-16 09:04:03 -05:00
|
|
|
|
2011-11-21 08:59:36 -05:00
|
|
|
bin/stow: bin/stow.in Makefile
|
2011-11-16 09:04:03 -05:00
|
|
|
$(edit) < $< > $@
|
|
|
|
chmod +x $@
|
2001-12-24 09:57:46 -05:00
|
|
|
|
2011-11-21 08:59:36 -05:00
|
|
|
bin/chkstow: bin/chkstow.in Makefile
|
2011-11-16 09:04:03 -05:00
|
|
|
$(edit) < $< > $@
|
|
|
|
chmod +x $@
|
2001-12-24 09:57:46 -05:00
|
|
|
|
2011-11-23 18:45:48 -05:00
|
|
|
lib/Stow.pm: lib/Stow.pm.in Makefile $(DEFAULT_IGNORE_LIST)
|
|
|
|
( $(edit) < $<; cat $(DEFAULT_IGNORE_LIST) ) > $@
|
2011-11-24 11:28:09 -05:00
|
|
|
|
2011-11-24 12:33:36 -05:00
|
|
|
##############################################################################
|
|
|
|
# The below rules are only used by the developer.
|
|
|
|
##############################################################################
|
2001-12-24 09:57:46 -05:00
|
|
|
|
2011-11-24 12:33:36 -05:00
|
|
|
# It's conventional to generate $project.info, but it's also nicer to
|
|
|
|
# generate manual.html and manual.pdf (which ultimately go somewhere
|
|
|
|
# like /usr/share/doc/stow/) rather than stow.html and stow.pdf, to
|
|
|
|
# make it obvious that these files contain the manual. So we have to
|
|
|
|
# jump through a few extra hoops. We preserve timestamps to avoid any
|
|
|
|
# unnecessary rebuilds, since not everyone has texinfo installed.
|
|
|
|
doc/manual.texi: doc/stow.texi doc/version.texi
|
|
|
|
[ -d doc ] || mkdir doc # required in vpath mode
|
|
|
|
cp --preserve=timestamps $< $@
|
|
|
|
|
|
|
|
doc/manual.pdf: doc/stow.pdf doc/version.texi
|
|
|
|
[ -d doc ] || mkdir doc # required in vpath mode
|
|
|
|
cp --preserve=timestamps $< $@
|
|
|
|
|
|
|
|
# It's easier to calculate the absolute path to $(srcdir) rather than
|
|
|
|
# the relative path to it from the doc/ build subdirectory.
|
|
|
|
doc/manual.html: doc/manual.texi
|
2001-12-24 09:57:46 -05:00
|
|
|
-rm -f $@
|
2011-11-24 12:33:36 -05:00
|
|
|
srcdir=$$( cd $(srcdir); pwd ); \
|
|
|
|
cd doc && texi2html -I $$srcdir -expandinfo -menu -monolithic -verbose manual.texi
|
2011-11-16 09:30:55 -05:00
|
|
|
|
2011-11-24 11:52:50 -05:00
|
|
|
doc/stow.8: bin/stow Makefile
|
|
|
|
pod2man $< > $@
|
|
|
|
|
2011-11-24 11:28:09 -05:00
|
|
|
MODULES = lib/Stow.pm lib/Stow/Util.pm
|
2011-11-21 08:59:36 -05:00
|
|
|
test: bin/stow bin/chkstow $(MODULES)
|
2011-11-24 11:28:09 -05:00
|
|
|
perl -MTest::Harness -Ilib -It -Ibin -e 'runtests(@ARGV)' t/*.t
|