###	SPAR <http://www.cpan.org/scripts/>
###	11	755	1143325379	1143323853	makepp_test_script.pl
#
# Test of implicit makefile loading, which should fail when leaving a root.
# It should always succeed when there is no RootMakeppfile.
# It should not go to a forbidden subdir.
#
eval { makepp '-Crootdir' } and die;

rename 'rootdir/RootMakeppfile', 'rootdir/Makeppfile';
makepp '-Crootdir';

makepp;
###	9	644	1143324076	990028520	Makeppfile
$(phony all): a c

no_implicit_load subdir2

a: subdir1/b
	&cat $^ -o $@

c: subdir2/d subdir2/subsubdir/e
	&cat $^ -o $@
###	D	755	1143323853	1143323853	rootdir/
###	2	644	1143324379	1143323853	rootdir/RootMakeppfile
x: ../outside/y
	&cp -l $(input) x
###	D	755	1143323853	1143323853	outside/
###	8	644	1143324382	1404410028	outside/Makeppfile
no_implicit_load o*

y: oh/y
	&echo foo bar -o y

&mkdir oh
&echo 'perl { die }' -o oh/Makeppfile # New dir to be considered for no load
&touch oh/y
###	D	755	1067451875	990028507	subdir1/
###	2	644	1067451875	990027944	subdir1/Makeppfile
b:
	&echo 'b' -o $@
###	D	755	1067451875	990028498	subdir2/
###	1	644	1067451875	990028523	subdir2/d
d
###	5	644	1067451875	990028042	subdir2/Makeppfile
#
# This makefile should not be implicitly loaded.
#
c:
	&echo 'Bogus garbage from wrongly loaded makefile' -o $@
###	1	644	1067451875	990028068	subdir2/d_orig
d
###	D	755	1067451875	990028498	subdir2/subsubdir/
###	1	644	1067451875	990028523	subdir2/subsubdir/e
e
###	5	644	1067451875	990028050	subdir2/subsubdir/Makeppfile
#
# This makefile should not be implicitly loaded.
#
e:
	&echo 'Bogus garbage from wrongly loaded makefile' -o $@
###	1	644	1067451875	990028075	subdir2/subsubdir/e_orig
e
###	D	755	1067451875	990028444	answers/
###	D	755	1143323853	1143323853	answers/rootdir/
###	1	644	1143324537	1143323853	answers/rootdir/x
foo bar
###	1	644	1067451875	990028444	answers/a
b
###	2	644	1067451875	990028444	answers/c
d
e
###	1	644	1067451875	1190053838	answers/n_files
3 1 0