Reign in (a little bit) the sprawling CRLF insanity on Win32
[dbsrgits/DBIx-Class.git] / maint / Makefile.PL.inc / 56_autogen_testddl.pl
CommitLineData
e01862e4 1require File::Spec;
2my $ddl_fn = File::Spec->catfile(qw(t lib sqlite.sql));
3
4# If the author doesn't have the prereqs, we will end up obliterating
5# the ddl file, and all tests will fail, therefore don't do anything
6# on error
7# The EUMM build-stage generation will run unconditionally and
8# errors will not be trapped
9if (my $out = ` "$^X" -Ilib maint/gen_schema `) {
10 open (my $fh, '>:unix', $ddl_fn) or die "Unable to open $ddl_fn: $!";
11 print $fh $out;
12 close $fh;
13}
14
15postamble <<"EOP";
16
17clonedir_generate_files : dbic_clonedir_regen_test_ddl
18
19dbic_clonedir_regen_test_ddl :
20\t\$(ABSPERLRUN) -Ilib -- maint/gen_schema > @{[ $mm_proto->quote_literal($ddl_fn) ]}
ffce4b65 21@{[ $crlf_fixup->($ddl_fn) ]}
e01862e4 22EOP
23
ffce4b65 24
25
e01862e4 26# keep the Makefile.PL eval happy
271;