diff options
Diffstat (limited to 'cxxtest/sample/Makefile.PL')
| -rwxr-xr-x | cxxtest/sample/Makefile.PL | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/cxxtest/sample/Makefile.PL b/cxxtest/sample/Makefile.PL new file mode 100755 index 000000000..d29afcc68 --- /dev/null +++ b/cxxtest/sample/Makefile.PL @@ -0,0 +1,32 @@ +#!/usr/bin/perl +# +# This isn't a "real" `Makefile.PL' +# It just copies the correct `Makefile.*' to `Makefile' +# +use strict; +use Getopt::Long; +use File::Copy; + +sub usage() { + die "Usage: $0 [--bcc32]\n"; +} + +my $source; +my $target = 'Makefile'; +my $windows = $ENV{'windir'}; + +GetOptions( 'bcc32' => sub { $source = 'Makefile.bcc32' } ) or usage(); +if ( !defined( $source ) ) { + $source = $windows ? 'Makefile.msvc' : 'Makefile.unix'; +} + +unlink($target); +$windows ? copy($source, $target) : symlink($source, $target); + +print "`Makefile' is now `$source'.\n"; + +# +# Local Variables: +# compile-command: "perl Makefile.PL" +# End: +# |
