ExtUtils::MakeMaker 6.10_08
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / MM_Any.pm
CommitLineData
f6d6199c 1package ExtUtils::MM_Any;
2
3use strict;
4use vars qw($VERSION @ISA);
c2990482 5$VERSION = 0.06;
479d2113 6@ISA = qw(File::Spec);
f6d6199c 7
8use Config;
9use File::Spec;
10
11
12=head1 NAME
13
14ExtUtils::MM_Any - Platform agnostic MM methods
15
16=head1 SYNOPSIS
17
18 FOR INTERNAL USE ONLY!
19
20 package ExtUtils::MM_SomeOS;
21
22 # Temporarily, you have to subclass both. Put MM_Any first.
23 require ExtUtils::MM_Any;
24 require ExtUtils::MM_Unix;
25 @ISA = qw(ExtUtils::MM_Any ExtUtils::Unix);
26
27=head1 DESCRIPTION
28
29B<FOR INTERNAL USE ONLY!>
30
31ExtUtils::MM_Any is a superclass for the ExtUtils::MM_* set of
32modules. It contains methods which are either inherently
33cross-platform or are written in a cross-platform manner.
34
35Subclass off of ExtUtils::MM_Any I<and> ExtUtils::MM_Unix. This is a
36temporary solution.
37
38B<THIS MAY BE TEMPORARY!>
39
40=head1 Inherently Cross-Platform Methods
41
42These are methods which are by their nature cross-platform and should
43always be cross-platform.
44
dedf98bc 45=over 4
46
5e719f03 47=item installvars
48
49 my @installvars = $mm->installvars;
50
51A list of all the INSTALL* variables without the INSTALL prefix. Useful
52for iteration or building related variable sets.
53
54=cut
55
56sub installvars {
57 return qw(PRIVLIB SITELIB VENDORLIB
58 ARCHLIB SITEARCH VENDORARCH
59 BIN SITEBIN VENDORBIN
60 SCRIPT
61 MAN1DIR SITEMAN1DIR VENDORMAN1DIR
62 MAN3DIR SITEMAN3DIR VENDORMAN3DIR
63 );
64}
65
dedf98bc 66=item os_flavor_is
67
68 $mm->os_flavor_is($this_flavor);
69 $mm->os_flavor_is(@one_of_these_flavors);
70
71Checks to see if the current operating system is one of the given flavors.
72
73This is useful for code like:
74
75 if( $mm->os_flavor_is('Unix') ) {
76 $out = `foo 2>&1`;
77 }
78 else {
79 $out = `foo`;
80 }
81
82=cut
83
84sub os_flavor_is {
85 my $self = shift;
86 my %flavors = map { ($_ => 1) } $self->os_flavor;
87 return (grep { $flavors{$_} } @_) ? 1 : 0;
88}
89
90=back
91
479d2113 92=head2 File::Spec wrappers
f6d6199c 93
479d2113 94ExtUtils::MM_Any is a subclass of File::Spec. The methods noted here
95override File::Spec.
f6d6199c 96
479d2113 97=over 4
98
99=item catfile
100
101File::Spec <= 0.83 has a bug where the file part of catfile is not
102canonicalized. This override fixes that bug.
103
104=cut
105
106sub catfile {
107 my $self = shift;
108 return $self->canonpath($self->SUPER::catfile(@_));
109}
110
111=back
112
113=head1 Thought To Be Cross-Platform Methods
114
115These are methods which are thought to be cross-platform by virtue of
116having been written in a way to avoid incompatibilities. They may
117require partial overrides.
f6d6199c 118
119=over 4
120
479d2113 121=item B<split_command>
122
123 my @cmds = $MM->split_command($cmd, @args);
124
125Most OS have a maximum command length they can execute at once. Large
126modules can easily generate commands well past that limit. Its
127necessary to split long commands up into a series of shorter commands.
128
129split_command() will return a series of @cmds each processing part of
130the args. Collectively they will process all the arguments. Each
131individual line in @cmds will not be longer than the
132$self->max_exec_len being careful to take into account macro expansion.
133
134$cmd should include any switches and repeated initial arguments.
135
136If no @args are given, no @cmds will be returned.
137
138Pairs of arguments will always be preserved in a single command, this
139is a heuristic for things like pm_to_blib and pod2man which work on
140pairs of arguments. This makes things like this safe:
141
142 $self->split_command($cmd, %pod2man);
143
f6d6199c 144
145=cut
146
479d2113 147sub split_command {
148 my($self, $cmd, @args) = @_;
149
150 my @cmds = ();
151 return(@cmds) unless @args;
152
153 # If the command was given as a here-doc, there's probably a trailing
154 # newline.
155 chomp $cmd;
156
157 # set aside 20% for macro expansion.
158 my $len_left = int($self->max_exec_len * 0.80);
159 $len_left -= length $self->_expand_macros($cmd);
160
161 do {
162 my $arg_str = '';
163 my @next_args;
164 while( @next_args = splice(@args, 0, 2) ) {
165 # Two at a time to preserve pairs.
166 my $next_arg_str = "\t ". join ' ', @next_args, "\n";
167
168 if( !length $arg_str ) {
169 $arg_str .= $next_arg_str
170 }
171 elsif( length($arg_str) + length($next_arg_str) > $len_left ) {
172 unshift @args, @next_args;
173 last;
174 }
175 else {
176 $arg_str .= $next_arg_str;
177 }
178 }
179 chop $arg_str;
180
181 push @cmds, $self->escape_newlines("$cmd\n$arg_str");
182 } while @args;
183
184 return @cmds;
f6d6199c 185}
186
479d2113 187
188sub _expand_macros {
189 my($self, $cmd) = @_;
190
191 $cmd =~ s{\$\((\w+)\)}{
192 defined $self->{$1} ? $self->{$1} : "\$($1)"
193 }e;
194 return $cmd;
195}
196
197
198=item B<echo>
199
200 my @commands = $MM->echo($text);
201 my @commands = $MM->echo($text, $file);
202 my @commands = $MM->echo($text, $file, $appending);
203
204Generates a set of @commands which print the $text to a $file.
205
206If $file is not given, output goes to STDOUT.
207
208If $appending is true the $file will be appended to rather than
209overwritten.
f6d6199c 210
211=cut
212
479d2113 213sub echo {
214 my($self, $text, $file, $appending) = @_;
215 $appending ||= 0;
216
217 my @cmds = map { '$(NOECHO) $(ECHO) '.$self->quote_literal($_) }
218 split /\n/, $text;
219 if( $file ) {
220 my $redirect = $appending ? '>>' : '>';
221 $cmds[0] .= " $redirect $file";
222 $_ .= " >> $file" foreach @cmds[1..$#cmds];
223 }
224
225 return @cmds;
f6d6199c 226}
227
479d2113 228
229=item init_VERSION
230
231 $mm->init_VERSION
232
233Initialize macros representing versions of MakeMaker and other tools
234
235MAKEMAKER: path to the MakeMaker module.
236
237MM_VERSION: ExtUtils::MakeMaker Version
238
239MM_REVISION: ExtUtils::MakeMaker version control revision (for backwards
240 compat)
241
242VERSION: version of your module
243
244VERSION_MACRO: which macro represents the version (usually 'VERSION')
245
246VERSION_SYM: like version but safe for use as an RCS revision number
247
248DEFINE_VERSION: -D line to set the module version when compiling
249
250XS_VERSION: version in your .xs file. Defaults to $(VERSION)
251
252XS_VERSION_MACRO: which macro represents the XS version.
253
254XS_DEFINE_VERSION: -D line to set the xs version when compiling.
255
256Called by init_main.
f6d6199c 257
258=cut
259
479d2113 260sub init_VERSION {
261 my($self) = shift;
262
dedf98bc 263 $self->{MAKEMAKER} = $ExtUtils::MakeMaker::Filename;
479d2113 264 $self->{MM_VERSION} = $ExtUtils::MakeMaker::VERSION;
265 $self->{MM_REVISION}= $ExtUtils::MakeMaker::Revision;
266 $self->{VERSION_FROM} ||= '';
267
268 if ($self->{VERSION_FROM}){
269 $self->{VERSION} = $self->parse_version($self->{VERSION_FROM});
270 if( $self->{VERSION} eq 'undef' ) {
271 require Carp;
272 Carp::carp("WARNING: Setting VERSION via file ".
273 "'$self->{VERSION_FROM}' failed\n");
274 }
275 }
276
277 # strip blanks
278 if (defined $self->{VERSION}) {
279 $self->{VERSION} =~ s/^\s+//;
280 $self->{VERSION} =~ s/\s+$//;
281 }
282 else {
283 $self->{VERSION} = '';
284 }
285
286
287 $self->{VERSION_MACRO} = 'VERSION';
288 ($self->{VERSION_SYM} = $self->{VERSION}) =~ s/\W/_/g;
289 $self->{DEFINE_VERSION} = '-D$(VERSION_MACRO)=\"$(VERSION)\"';
290
291
292 # Graham Barr and Paul Marquess had some ideas how to ensure
293 # version compatibility between the *.pm file and the
294 # corresponding *.xs file. The bottomline was, that we need an
295 # XS_VERSION macro that defaults to VERSION:
296 $self->{XS_VERSION} ||= $self->{VERSION};
297
298 $self->{XS_VERSION_MACRO} = 'XS_VERSION';
299 $self->{XS_DEFINE_VERSION} = '-D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"';
300
f6d6199c 301}
302
479d2113 303=item wraplist
304
305Takes an array of items and turns them into a well-formatted list of
306arguments. In most cases this is simply something like:
307
308 FOO \
309 BAR \
310 BAZ
f6d6199c 311
312=cut
313
479d2113 314sub wraplist {
315 my $self = shift;
316 return join " \\\n\t", @_;
f6d6199c 317}
318
479d2113 319=item manifypods
320
321Defines targets and routines to translate the pods into manpages and
322put them into the INST_* directories.
f6d6199c 323
324=cut
325
479d2113 326sub manifypods {
327 my $self = shift;
328
329 my $POD2MAN_EXE_macro = $self->POD2MAN_EXE_macro();
330 my $manifypods_target = $self->manifypods_target();
331
332 return <<END_OF_TARGET;
333
334# --- Begin manifypods section:
335$POD2MAN_EXE_macro
336
337$manifypods_target
338
339# --- End manifypods section --- #
340
341END_OF_TARGET
342
f6d6199c 343}
344
479d2113 345
346=item manifypods_target
347
348 my $manifypods_target = $self->manifypods_target;
349
350Generates the manifypods target. This target generates man pages from
351all POD files in MAN1PODS and MAN3PODS.
f6d6199c 352
353=cut
354
479d2113 355sub manifypods_target {
356 my($self) = shift;
357
358 my $man1pods = '';
359 my $man3pods = '';
360 my $dependencies = '';
361
362 # populate manXpods & dependencies:
363 foreach my $name (keys %{$self->{MAN1PODS}}, keys %{$self->{MAN3PODS}}) {
364 $dependencies .= " \\\n\t$name";
365 }
366
367 foreach my $name (keys %{$self->{MAN3PODS}}) {
368 $dependencies .= " \\\n\t$name"
369 }
370
371 my $manify = <<END;
372manifypods : pure_all $dependencies
373END
374
375 my @man_cmds;
376 foreach my $section (qw(1 3)) {
377 my $pods = $self->{"MAN${section}PODS"};
378 push @man_cmds, $self->split_command(<<CMD, %$pods);
379 \$(NOECHO) \$(POD2MAN_EXE) --section=$section --perm_rw=\$(PERM_RW)
380CMD
381 }
382
dedf98bc 383 $manify .= "\t\$(NOECHO) \$(NOOP)\n" unless @man_cmds;
479d2113 384 $manify .= join '', map { "$_\n" } @man_cmds;
385
386 return $manify;
f6d6199c 387}
388
479d2113 389
390=item makemakerdflt_target
391
392 my $make_frag = $mm->makemakerdflt_target
393
394Returns a make fragment with the makemakerdeflt_target specified.
395This target is the first target in the Makefile, is the default target
396and simply points off to 'all' just in case any make variant gets
397confused or something gets snuck in before the real 'all' target.
f6d6199c 398
399=cut
400
479d2113 401sub makemakerdflt_target {
402 return <<'MAKE_FRAG';
403makemakerdflt: all
404 $(NOECHO) $(NOOP)
405MAKE_FRAG
406
f6d6199c 407}
408
479d2113 409
410=item special_targets
411
412 my $make_frag = $mm->special_targets
413
414Returns a make fragment containing any targets which have special
415meaning to make. For example, .SUFFIXES and .PHONY.
f6d6199c 416
417=cut
418
479d2113 419sub special_targets {
420 my $make_frag = <<'MAKE_FRAG';
421.SUFFIXES: .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
422
423.PHONY: all config static dynamic test linkext manifest
424
425MAKE_FRAG
426
427 $make_frag .= <<'MAKE_FRAG' if $ENV{CLEARCASE_ROOT};
428.NO_CONFIG_REC: Makefile
429
430MAKE_FRAG
431
432 return $make_frag;
f6d6199c 433}
434
479d2113 435=item POD2MAN_EXE_macro
f6d6199c 436
479d2113 437 my $pod2man_exe_macro = $self->POD2MAN_EXE_macro
f6d6199c 438
479d2113 439Returns a definition for the POD2MAN_EXE macro. This is a program
440which emulates the pod2man utility. You can add more switches to the
441command by simply appending them on the macro.
442
443Typical usage:
444
445 $(POD2MAN_EXE) --section=3 --perm_rw=$(PERM_RW) podfile man_page
446
447=cut
448
449sub POD2MAN_EXE_macro {
450 my $self = shift;
451
452# Need the trailing '--' so perl stops gobbling arguments and - happens
453# to be an alternative end of line seperator on VMS so we quote it
454 return <<'END_OF_DEF';
455POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
456END_OF_DEF
457}
f6d6199c 458
f6d6199c 459
460=item test_via_harness
461
462 my $command = $mm->test_via_harness($perl, $tests);
463
464Returns a $command line which runs the given set of $tests with
465Test::Harness and the given $perl.
466
467Used on the t/*.t files.
468
469=cut
470
471sub test_via_harness {
472 my($self, $perl, $tests) = @_;
473
e0678a30 474 return qq{\t$perl "-MExtUtils::Command::MM" }.
475 qq{"-e" "test_harness(\$(TEST_VERBOSE), '\$(INST_LIB)', '\$(INST_ARCHLIB)')" $tests\n};
f6d6199c 476}
477
478=item test_via_script
479
480 my $command = $mm->test_via_script($perl, $script);
481
482Returns a $command line which just runs a single test without
483Test::Harness. No checks are done on the results, they're just
484printed.
485
486Used for test.pl, since they don't always follow Test::Harness
487formatting.
488
489=cut
490
491sub test_via_script {
492 my($self, $perl, $script) = @_;
e0678a30 493 return qq{\t$perl "-I\$(INST_LIB)" "-I\$(INST_ARCHLIB)" $script\n};
f6d6199c 494}
495
479d2113 496=item libscan
497
498 my $wanted = $self->libscan($path);
499
500Takes a path to a file or dir and returns an empty string if we don't
501want to include this file in the library. Otherwise it returns the
502the $path unchanged.
503
504Mainly used to exclude RCS, CVS, and SCCS directories from
505installation.
506
507=cut
508
509sub libscan {
510 my($self,$path) = @_;
511 my($dirs,$file) = ($self->splitpath($path))[1,2];
ad2f23df 512 return '' if grep /^(?:RCS|CVS|SCCS|\.svn)$/,
479d2113 513 $self->splitdir($dirs), $file;
514
515 return $path;
516}
517
518=item tool_autosplit
519
520Defines a simple perl call that runs autosplit. May be deprecated by
521pm_to_blib soon.
522
523=cut
524
525sub tool_autosplit {
526 my($self, %attribs) = @_;
527
528 my $maxlen = $attribs{MAXLEN} ? '$$AutoSplit::Maxlen=$attribs{MAXLEN};'
529 : '';
530
531 my $asplit = $self->oneliner(sprintf <<'PERL_CODE', $maxlen);
532use AutoSplit; %s autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)
533PERL_CODE
534
535 return sprintf <<'MAKE_FRAG', $asplit;
536# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
537AUTOSPLITFILE = %s
538
539MAKE_FRAG
540
541}
542
543
544=item all_target
545
546Generate the default target 'all'.
547
548=cut
549
550sub all_target {
551 my $self = shift;
552
553 return <<'MAKE_EXT';
554all :: pure_all
555 $(NOECHO) $(NOOP)
556MAKE_EXT
557
558}
559
560
561=item metafile_target
562
563 my $target = $mm->metafile_target;
564
565Generate the metafile target.
566
567Writes the file META.yml, YAML encoded meta-data about the module. The
568format follows Module::Build's as closely as possible. Additionally, we
569include:
570
571 version_from
572 installdirs
573
574=cut
575
576sub metafile_target {
577 my $self = shift;
578
431b0fc4 579 return <<'MAKE_FRAG' if $self->{NO_META};
580metafile:
581 $(NOECHO) $(NOOP)
582MAKE_FRAG
583
479d2113 584 my $prereq_pm = '';
585 while( my($mod, $ver) = each %{$self->{PREREQ_PM}} ) {
586 $prereq_pm .= sprintf " %-30s %s\n", "$mod:", $ver;
587 }
588
589 my $meta = <<YAML;
590#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
591name: $self->{DISTNAME}
592version: $self->{VERSION}
593version_from: $self->{VERSION_FROM}
594installdirs: $self->{INSTALLDIRS}
595requires:
596$prereq_pm
597distribution_type: module
598generated_by: ExtUtils::MakeMaker version $ExtUtils::MakeMaker::VERSION
599YAML
600
601 my @write_meta = $self->echo($meta, 'META.yml');
602 return sprintf <<'MAKE_FRAG', join "\n\t", @write_meta;
603metafile :
604 %s
605MAKE_FRAG
606
607}
608
609
610=item metafile_addtomanifest_target
611
612 my $target = $mm->metafile_addtomanifest_target
613
614Adds the META.yml file to the MANIFEST.
615
616=cut
617
618sub metafile_addtomanifest_target {
619 my $self = shift;
620
431b0fc4 621 return <<'MAKE_FRAG' if $self->{NO_META};
622metafile_addtomanifest:
623 $(NOECHO) $(NOOP)
624MAKE_FRAG
625
479d2113 626 my $add_meta = $self->oneliner(<<'CODE', ['-MExtUtils::Manifest=maniadd']);
1df8d179 627eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) }
c2990482 628 or print "Could not add META.yml to MANIFEST: $${'@'}\n"
479d2113 629CODE
630
631 return sprintf <<'MAKE_FRAG', $add_meta;
632metafile_addtomanifest:
633 $(NOECHO) %s
634MAKE_FRAG
635
636}
637
638
639=back
640
641=head2 Abstract methods
642
643Methods which cannot be made cross-platform and each subclass will
644have to do their own implementation.
645
646=over 4
647
648=item oneliner
649
650 my $oneliner = $MM->oneliner($perl_code);
651 my $oneliner = $MM->oneliner($perl_code, \@switches);
652
653This will generate a perl one-liner safe for the particular platform
654you're on based on the given $perl_code and @switches (a -e is
655assumed) suitable for using in a make target. It will use the proper
656shell quoting and escapes.
657
658$(PERLRUN) will be used as perl.
659
660Any newlines in $perl_code will be escaped. Leading and trailing
661newlines will be stripped. Makes this idiom much easier:
662
663 my $code = $MM->oneliner(<<'CODE', [...switches...]);
664some code here
665another line here
666CODE
667
668Usage might be something like:
669
670 # an echo emulation
671 $oneliner = $MM->oneliner('print "Foo\n"');
672 $make = '$oneliner > somefile';
673
674All dollar signs must be doubled in the $perl_code if you expect them
675to be interpreted normally, otherwise it will be considered a make
676macro. Also remember to quote make macros else it might be used as a
677bareword. For example:
678
679 # Assign the value of the $(VERSION_FROM) make macro to $vf.
680 $oneliner = $MM->oneliner('$$vf = "$(VERSION_FROM)"');
681
682Its currently very simple and may be expanded sometime in the figure
683to include more flexible code and switches.
684
685
686=item B<quote_literal>
687
688 my $safe_text = $MM->quote_literal($text);
689
690This will quote $text so it is interpreted literally in the shell.
691
692For example, on Unix this would escape any single-quotes in $text and
693put single-quotes around the whole thing.
694
695
696=item B<escape_newlines>
697
698 my $escaped_text = $MM->escape_newlines($text);
699
700Shell escapes newlines in $text.
701
702
703=item max_exec_len
704
705 my $max_exec_len = $MM->max_exec_len;
706
707Calculates the maximum command size the OS can exec. Effectively,
708this is the max size of a shell command line.
709
710=for _private
711$self->{_MAX_EXEC_LEN} is set by this method, but only for testing purposes.
712
713=item B<init_others>
714
715 $MM->init_others();
716
717Initializes the macro definitions used by tools_other() and places them
718in the $MM object.
719
720If there is no description, its the same as the parameter to
721WriteMakefile() documented in ExtUtils::MakeMaker.
722
723Defines at least these macros.
724
725 Macro Description
726
dedf98bc 727 NOOP Do nothing
728 NOECHO Tell make not to display the command itself
479d2113 729
730 MAKEFILE
731 FIRST_MAKEFILE
732 MAKEFILE_OLD
733 MAKE_APERL_FILE File used by MAKE_APERL
734
735 SHELL Program used to run
736 shell commands
737
dedf98bc 738 ECHO Print text adding a newline on the end
479d2113 739 RM_F Remove a file
740 RM_RF Remove a directory
741 TOUCH Update a file's timestamp
742 TEST_F Test for a file's existence
743 CP Copy a file
744 MV Move a file
745 CHMOD Change permissions on a
746 file
747
748 UMASK_NULL Nullify umask
749 DEV_NULL Supress all command output
750
751=item init_DIRFILESEP
752
753 $MM->init_DIRFILESEP;
754 my $dirfilesep = $MM->{DIRFILESEP};
755
756Initializes the DIRFILESEP macro which is the seperator between the
757directory and filename in a filepath. ie. / on Unix, \ on Win32 and
758nothing on VMS.
759
760For example:
761
762 # instead of $(INST_ARCHAUTODIR)/extralibs.ld
763 $(INST_ARCHAUTODIR)$(DIRFILESEP)extralibs.ld
764
765Something of a hack but it prevents a lot of code duplication between
766MM_* variants.
767
768Do not use this as a seperator between directories. Some operating
769systems use different seperators between subdirectories as between
770directories and filenames (for example: VOLUME:[dir1.dir2]file on VMS).
771
772=item init_linker
773
774 $mm->init_linker;
775
776Initialize macros which have to do with linking.
777
778PERL_ARCHIVE: path to libperl.a equivalent to be linked to dynamic
779extensions.
780
781PERL_ARCHIVE_AFTER: path to a library which should be put on the
782linker command line I<after> the external libraries to be linked to
783dynamic extensions. This may be needed if the linker is one-pass, and
784Perl includes some overrides for C RTL functions, such as malloc().
785
786EXPORT_LIST: name of a file that is passed to linker to define symbols
787to be exported.
788
789Some OSes do not need these in which case leave it blank.
790
791
792=item init_platform
793
794 $mm->init_platform
795
796Initialize any macros which are for platform specific use only.
797
798A typical one is the version number of your OS specific mocule.
799(ie. MM_Unix_VERSION or MM_VMS_VERSION).
800
801=item platform_constants
802
803 my $make_frag = $mm->platform_constants
804
805Returns a make fragment defining all the macros initialized in
806init_platform() rather than put them in constants().
807
808=cut
809
810sub init_platform {
811 return '';
812}
813
814sub platform_constants {
815 return '';
816}
817
dedf98bc 818=item os_flavor
819
820 my @os_flavor = $mm->os_flavor;
821
822@os_flavor is the style of operating system this is, usually
823corresponding to the MM_*.pm file we're using.
824
825The first element of @os_flavor is the major family (ie. Unix,
826Windows, VMS, OS/2, MacOS, etc...) and the rest are sub families.
827
828Some examples:
829
830 Cygwin98 ('Unix', 'Cygwin', 'Cygwin9x')
831 Windows NT ('Win32', 'WinNT')
832 Win98 ('Win32', 'Win9x')
833 Linux ('Unix', 'Linux')
834 MacOS Classic ('MacOS', 'MacOS Classic')
835 MacOS X ('Unix', 'Darwin', 'MacOS', 'MacOS X')
836 OS/2 ('OS/2')
837
838This is used to write code for styles of operating system.
839See os_flavor_is() for use.
840
479d2113 841
f6d6199c 842=back
843
844=head1 AUTHOR
845
479d2113 846Michael G Schwern <schwern@pobox.com> and the denizens of
847makemaker@perl.org with code from ExtUtils::MM_Unix and
848ExtUtils::MM_Win32.
f6d6199c 849
850
851=cut
852
8531;