summaryrefslogtreecommitdiffstats
path: root/upstream/debian-bookworm/man3/ExtUtils::MM_Any.3perl
blob: d5c696645ef41962e951f3168a4f1c0b3ec3eadf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "ExtUtils::MM_Any 3perl"
.TH ExtUtils::MM_Any 3perl "2023-11-25" "perl v5.36.0" "Perl Programmers Reference Guide"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
ExtUtils::MM_Any \- Platform\-agnostic MM methods
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 1
\&  FOR INTERNAL USE ONLY!
\&
\&  package ExtUtils::MM_SomeOS;
\&
\&  # Temporarily, you have to subclass both.  Put MM_Any first.
\&  require ExtUtils::MM_Any;
\&  require ExtUtils::MM_Unix;
\&  @ISA = qw(ExtUtils::MM_Any ExtUtils::Unix);
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
\&\fB\s-1FOR INTERNAL USE ONLY\s0!\fR
.PP
ExtUtils::MM_Any is a superclass for the ExtUtils::MM_* set of
modules.  It contains methods which are either inherently
cross-platform or are written in a cross-platform manner.
.PP
Subclass off of ExtUtils::MM_Any \fIand\fR ExtUtils::MM_Unix.  This is a
temporary solution.
.PP
\&\fB\s-1THIS MAY BE TEMPORARY\s0!\fR
.SH "METHODS"
.IX Header "METHODS"
Any methods marked \fIAbstract\fR must be implemented by subclasses.
.SS "Cross-platform helper methods"
.IX Subsection "Cross-platform helper methods"
These are methods which help writing cross-platform code.
.PP
\fIos_flavor  \fIAbstract\fI\fR
.IX Subsection "os_flavor Abstract"
.PP
.Vb 1
\&    my @os_flavor = $mm\->os_flavor;
.Ve
.PP
\&\f(CW@os_flavor\fR is the style of operating system this is, usually
corresponding to the MM_*.pm file we're using.
.PP
The first element of \f(CW@os_flavor\fR is the major family (ie. Unix,
Windows, \s-1VMS, OS/2,\s0 etc...) and the rest are sub families.
.PP
Some examples:
.PP
.Vb 6
\&    Cygwin98       (\*(AqUnix\*(Aq,  \*(AqCygwin\*(Aq, \*(AqCygwin9x\*(Aq)
\&    Windows        (\*(AqWin32\*(Aq)
\&    Win98          (\*(AqWin32\*(Aq, \*(AqWin9x\*(Aq)
\&    Linux          (\*(AqUnix\*(Aq,  \*(AqLinux\*(Aq)
\&    MacOS X        (\*(AqUnix\*(Aq,  \*(AqDarwin\*(Aq, \*(AqMacOS\*(Aq, \*(AqMacOS X\*(Aq)
\&    OS/2           (\*(AqOS/2\*(Aq)
.Ve
.PP
This is used to write code for styles of operating system.
See \fBos_flavor_is()\fR for use.
.PP
\fIos_flavor_is\fR
.IX Subsection "os_flavor_is"
.PP
.Vb 2
\&    my $is_this_flavor = $mm\->os_flavor_is($this_flavor);
\&    my $is_this_flavor = $mm\->os_flavor_is(@one_of_these_flavors);
.Ve
.PP
Checks to see if the current operating system is one of the given flavors.
.PP
This is useful for code like:
.PP
.Vb 6
\&    if( $mm\->os_flavor_is(\*(AqUnix\*(Aq) ) {
\&        $out = \`foo 2>&1\`;
\&    }
\&    else {
\&        $out = \`foo\`;
\&    }
.Ve
.PP
\fIcan_load_xs\fR
.IX Subsection "can_load_xs"
.PP
.Vb 1
\&    my $can_load_xs = $self\->can_load_xs;
.Ve
.PP
Returns true if we have the ability to load \s-1XS.\s0
.PP
This is important because miniperl, used to build \s-1XS\s0 modules in the
core, can not load \s-1XS.\s0
.PP
\fIcan_run\fR
.IX Subsection "can_run"
.PP
.Vb 2
\&  use ExtUtils::MM;
\&  my $runnable = MM\->can_run($Config{make});
.Ve
.PP
If called in a scalar context it will return the full path to the binary
you asked for if it was found, or \f(CW\*(C`undef\*(C'\fR if it was not.
.PP
If called in a list context, it will return a list of the full paths to instances
of the binary where found in \f(CW\*(C`PATH\*(C'\fR, or an empty list if it was not found.
.PP
Copied from IPC::Cmd, but modified into
a method (and removed \f(CW$INSTANCES\fR capability).
.PP
\fIcan_redirect_error\fR
.IX Subsection "can_redirect_error"
.PP
.Vb 1
\&  $useredirect = MM\->can_redirect_error;
.Ve
.PP
True if on an \s-1OS\s0 where qx operator (or backticks) can redirect \f(CW\*(C`STDERR\*(C'\fR
onto \f(CW\*(C`STDOUT\*(C'\fR.
.PP
\fIis_make_type\fR
.IX Subsection "is_make_type"
.PP
.Vb 1
\&    my $is_dmake = $self\->is_make_type(\*(Aqdmake\*(Aq);
.Ve
.PP
Returns true if \f(CW\*(C`$self\->make\*(C'\fR is the given type; possibilities are:
.PP
.Vb 4
\&  gmake    GNU make
\&  dmake
\&  nmake
\&  bsdmake  BSD pmake\-derived
.Ve
.PP
\fIcan_dep_space\fR
.IX Subsection "can_dep_space"
.PP
.Vb 1
\&    my $can_dep_space = $self\->can_dep_space;
.Ve
.PP
Returns true if \f(CW\*(C`make\*(C'\fR can handle (probably by quoting)
dependencies that contain a space. Currently known true for \s-1GNU\s0 make,
false for \s-1BSD\s0 pmake derivative.
.PP
\fIquote_dep\fR
.IX Subsection "quote_dep"
.PP
.Vb 1
\&  $text = $mm\->quote_dep($text);
.Ve
.PP
Method that protects Makefile single-value constants (mainly filenames),
so that make will still treat them as single values even if they
inconveniently have spaces in. If the make program being used cannot
achieve such protection and the given text would need it, throws an
exception.
.PP
\fIsplit_command\fR
.IX Subsection "split_command"
.PP
.Vb 1
\&    my @cmds = $MM\->split_command($cmd, @args);
.Ve
.PP
Most \s-1OS\s0 have a maximum command length they can execute at once.  Large
modules can easily generate commands well past that limit.  Its
necessary to split long commands up into a series of shorter commands.
.PP
\&\f(CW\*(C`split_command\*(C'\fR will return a series of \f(CW@cmds\fR each processing part of
the args.  Collectively they will process all the arguments.  Each
individual line in \f(CW@cmds\fR will not be longer than the
\&\f(CW$self\fR\->max_exec_len being careful to take into account macro expansion.
.PP
\&\f(CW$cmd\fR should include any switches and repeated initial arguments.
.PP
If no \f(CW@args\fR are given, no \f(CW@cmds\fR will be returned.
.PP
Pairs of arguments will always be preserved in a single command, this
is a heuristic for things like pm_to_blib and pod2man which work on
pairs of arguments.  This makes things like this safe:
.PP
.Vb 1
\&    $self\->split_command($cmd, %pod2man);
.Ve
.PP
\fImake_type\fR
.IX Subsection "make_type"
.PP
Returns a suitable string describing the type of makefile being written.
.PP
\fIstashmeta\fR
.IX Subsection "stashmeta"
.PP
.Vb 1
\&    my @recipelines = $MM\->stashmeta($text, $file);
.Ve
.PP
Generates a set of \f(CW@recipelines\fR which will result in the literal
\&\f(CW$text\fR ending up in literal \f(CW$file\fR when the recipe is executed. Call
it once, with all the text you want in \f(CW$file\fR. Make macros will not
be expanded, so the locations will be fixed at configure-time, not
at build-time.
.PP
\fIecho\fR
.IX Subsection "echo"
.PP
.Vb 3
\&    my @commands = $MM\->echo($text);
\&    my @commands = $MM\->echo($text, $file);
\&    my @commands = $MM\->echo($text, $file, \e%opts);
.Ve
.PP
Generates a set of \f(CW@commands\fR which print the \f(CW$text\fR to a \f(CW$file\fR.
.PP
If \f(CW$file\fR is not given, output goes to \s-1STDOUT.\s0
.PP
If \f(CW$opts\fR{append} is true the \f(CW$file\fR will be appended to rather than
overwritten.  Default is to overwrite.
.PP
If \f(CW$opts\fR{allow_variables} is true, make variables of the form
\&\f(CW\*(C`$(...)\*(C'\fR will not be escaped.  Other \f(CW\*(C`$\*(C'\fR will.  Default is to escape
all \f(CW\*(C`$\*(C'\fR.
.PP
Example of use:
.PP
.Vb 1
\&    my $make = join \*(Aq\*(Aq, map "\et$_\en", $MM\->echo($text, $file);
.Ve
.PP
\fIwraplist\fR
.IX Subsection "wraplist"
.PP
.Vb 1
\&  my $args = $mm\->wraplist(@list);
.Ve
.PP
Takes an array of items and turns them into a well-formatted list of
arguments.  In most cases this is simply something like:
.PP
.Vb 3
\&    FOO \e
\&    BAR \e
\&    BAZ
.Ve
.PP
\fImaketext_filter\fR
.IX Subsection "maketext_filter"
.PP
.Vb 1
\&    my $filter_make_text = $mm\->maketext_filter($make_text);
.Ve
.PP
The text of the Makefile is run through this method before writing to
disk.  It allows systems a chance to make portability fixes to the
Makefile.
.PP
By default it does nothing.
.PP
This method is protected and not intended to be called outside of
MakeMaker.
.PP
\fIcd  \fIAbstract\fI\fR
.IX Subsection "cd Abstract"
.PP
.Vb 1
\&  my $subdir_cmd = $MM\->cd($subdir, @cmds);
.Ve
.PP
This will generate a make fragment which runs the \f(CW@cmds\fR in the given
\&\f(CW$dir\fR.  The rough equivalent to this, except cross platform.
.PP
.Vb 1
\&  cd $subdir && $cmd
.Ve
.PP
Currently \f(CW$dir\fR can only go down one level.  \*(L"foo\*(R" is fine.  \*(L"foo/bar\*(R" is
not.  \*(L"../foo\*(R" is right out.
.PP
The resulting \f(CW$subdir_cmd\fR has no leading tab nor trailing newline.  This
makes it easier to embed in a make string.  For example.
.PP
.Vb 6
\&      my $make = sprintf <<\*(AqCODE\*(Aq, $subdir_cmd;
\&  foo :
\&      $(ECHO) what
\&      %s
\&      $(ECHO) mouche
\&  CODE
.Ve
.PP
\fIoneliner  \fIAbstract\fI\fR
.IX Subsection "oneliner Abstract"
.PP
.Vb 2
\&  my $oneliner = $MM\->oneliner($perl_code);
\&  my $oneliner = $MM\->oneliner($perl_code, \e@switches);
.Ve
.PP
This will generate a perl one-liner safe for the particular platform
you're on based on the given \f(CW$perl_code\fR and \f(CW@switches\fR (a \-e is
assumed) suitable for using in a make target.  It will use the proper
shell quoting and escapes.
.PP
$(\s-1PERLRUN\s0) will be used as perl.
.PP
Any newlines in \f(CW$perl_code\fR will be escaped.  Leading and trailing
newlines will be stripped.  Makes this idiom much easier:
.PP
.Vb 4
\&    my $code = $MM\->oneliner(<<\*(AqCODE\*(Aq, [...switches...]);
\&some code here
\&another line here
\&CODE
.Ve
.PP
Usage might be something like:
.PP
.Vb 3
\&    # an echo emulation
\&    $oneliner = $MM\->oneliner(\*(Aqprint "Foo\en"\*(Aq);
\&    $make = \*(Aq$oneliner > somefile\*(Aq;
.Ve
.PP
Dollar signs in the \f(CW$perl_code\fR will be protected from make using the
\&\f(CW\*(C`quote_literal\*(C'\fR method, unless they are recognised as being a make
variable, \f(CW\*(C`$(varname)\*(C'\fR, in which case they will be left for make
to expand. Remember to quote make macros else it might be used as a
bareword. For example:
.PP
.Vb 2
\&    # Assign the value of the $(VERSION_FROM) make macro to $vf.
\&    $oneliner = $MM\->oneliner(\*(Aq$vf = "$(VERSION_FROM)"\*(Aq);
.Ve
.PP
Its currently very simple and may be expanded sometime in the figure
to include more flexible code and switches.
.PP
\fIquote_literal  \fIAbstract\fI\fR
.IX Subsection "quote_literal Abstract"
.PP
.Vb 2
\&    my $safe_text = $MM\->quote_literal($text);
\&    my $safe_text = $MM\->quote_literal($text, \e%options);
.Ve
.PP
This will quote \f(CW$text\fR so it is interpreted literally in the shell.
.PP
For example, on Unix this would escape any single-quotes in \f(CW$text\fR and
put single-quotes around the whole thing.
.PP
If \f(CW$options\fR{allow_variables} is true it will leave \f(CW\*(Aq$(FOO)\*(Aq\fR make
variables untouched.  If false they will be escaped like any other
\&\f(CW\*(C`$\*(C'\fR.  Defaults to true.
.PP
\fIescape_dollarsigns\fR
.IX Subsection "escape_dollarsigns"
.PP
.Vb 1
\&    my $escaped_text = $MM\->escape_dollarsigns($text);
.Ve
.PP
Escapes stray \f(CW\*(C`$\*(C'\fR so they are not interpreted as make variables.
.PP
It lets by \f(CW\*(C`$(...)\*(C'\fR.
.PP
\fIescape_all_dollarsigns\fR
.IX Subsection "escape_all_dollarsigns"
.PP
.Vb 1
\&    my $escaped_text = $MM\->escape_all_dollarsigns($text);
.Ve
.PP
Escapes all \f(CW\*(C`$\*(C'\fR so they are not interpreted as make variables.
.PP
\fIescape_newlines  \fIAbstract\fI\fR
.IX Subsection "escape_newlines Abstract"
.PP
.Vb 1
\&    my $escaped_text = $MM\->escape_newlines($text);
.Ve
.PP
Shell escapes newlines in \f(CW$text\fR.
.PP
\fImax_exec_len  \fIAbstract\fI\fR
.IX Subsection "max_exec_len Abstract"
.PP
.Vb 1
\&    my $max_exec_len = $MM\->max_exec_len;
.Ve
.PP
Calculates the maximum command size the \s-1OS\s0 can exec.  Effectively,
this is the max size of a shell command line.
.PP
\fImake\fR
.IX Subsection "make"
.PP
.Vb 1
\&    my $make = $MM\->make;
.Ve
.PP
Returns the make variant we're generating the Makefile for.  This attempts
to do some normalization on the information from \f(CW%Config\fR or the user.
.SS "Targets"
.IX Subsection "Targets"
These are methods which produce make targets.
.PP
\fIall_target\fR
.IX Subsection "all_target"
.PP
Generate the default target 'all'.
.PP
\fIblibdirs_target\fR
.IX Subsection "blibdirs_target"
.PP
.Vb 1
\&    my $make_frag = $mm\->blibdirs_target;
.Ve
.PP
Creates the blibdirs target which creates all the directories we use
in blib/.
.PP
The blibdirs.ts target is deprecated.  Depend on blibdirs instead.
.PP
\fIclean (o)\fR
.IX Subsection "clean (o)"
.PP
Defines the clean target.
.PP
\fIclean_subdirs_target\fR
.IX Subsection "clean_subdirs_target"
.PP
.Vb 1
\&  my $make_frag = $MM\->clean_subdirs_target;
.Ve
.PP
Returns the clean_subdirs target.  This is used by the clean target to
call clean on any subdirectories which contain Makefiles.
.PP
\fIdir_target\fR
.IX Subsection "dir_target"
.PP
.Vb 1
\&    my $make_frag = $mm\->dir_target(@directories);
.Ve
.PP
Generates targets to create the specified directories and set its
permission to \s-1PERM_DIR.\s0
.PP
Because depending on a directory to just ensure it exists doesn't work
too well (the modified time changes too often) \fBdir_target()\fR creates a
\&.exists file in the created directory.  It is this you should depend on.
For portability purposes you should use the $(\s-1DIRFILESEP\s0) macro rather
than a '/' to separate the directory from the file.
.PP
.Vb 1
\&    yourdirectory$(DIRFILESEP).exists
.Ve
.PP
\fIdistdir\fR
.IX Subsection "distdir"
.PP
Defines the scratch directory target that will hold the distribution
before tar-ing (or shar-ing).
.PP
\fIdist_test\fR
.IX Subsection "dist_test"
.PP
Defines a target that produces the distribution in the
scratch directory, and runs 'perl Makefile.PL; make ;make test' in that
subdirectory.
.PP
\fIxs_dlsyms_arg\fR
.IX Subsection "xs_dlsyms_arg"
.PP
Returns command-line arg(s) to linker for file listing dlsyms to export.
Defaults to returning empty string, can be overridden by e.g. \s-1AIX.\s0
.PP
\fIxs_dlsyms_ext\fR
.IX Subsection "xs_dlsyms_ext"
.PP
Returns file-extension for \f(CW\*(C`xs_make_dlsyms\*(C'\fR method's output file,
including any \*(L".\*(R" character.
.PP
\fIxs_dlsyms_extra\fR
.IX Subsection "xs_dlsyms_extra"
.PP
Returns any extra text to be prepended to the \f(CW$extra\fR argument of
\&\f(CW\*(C`xs_make_dlsyms\*(C'\fR.
.PP
\fIxs_dlsyms_iterator\fR
.IX Subsection "xs_dlsyms_iterator"
.PP
Iterates over necessary shared objects, calling \f(CW\*(C`xs_make_dlsyms\*(C'\fR method
for each with appropriate arguments.
.PP
\fIxs_make_dlsyms\fR
.IX Subsection "xs_make_dlsyms"
.PP
.Vb 12
\&    $self\->xs_make_dlsyms(
\&        \e%attribs, # hashref from %attribs in caller
\&        "$self\->{BASEEXT}.def", # output file for Makefile target
\&        \*(AqMakefile.PL\*(Aq, # dependency
\&        $self\->{NAME}, # shared object\*(Aqs "name"
\&        $self\->{DLBASE}, # last ::\-separated part of name
\&        $attribs{DL_FUNCS} || $self\->{DL_FUNCS} || {}, # various params
\&        $attribs{FUNCLIST} || $self\->{FUNCLIST} || [],
\&        $attribs{IMPORTS} || $self\->{IMPORTS} || {},
\&        $attribs{DL_VARS} || $self\->{DL_VARS} || [],
\&        # optional extra param that will be added as param to Mksymlists
\&    );
.Ve
.PP
Utility method that returns Makefile snippet to call \f(CW\*(C`Mksymlists\*(C'\fR.
.PP
\fIdynamic (o)\fR
.IX Subsection "dynamic (o)"
.PP
Defines the dynamic target.
.PP
\fImakemakerdflt_target\fR
.IX Subsection "makemakerdflt_target"
.PP
.Vb 1
\&  my $make_frag = $mm\->makemakerdflt_target
.Ve
.PP
Returns a make fragment with the makemakerdeflt_target specified.
This target is the first target in the Makefile, is the default target
and simply points off to 'all' just in case any make variant gets
confused or something gets snuck in before the real 'all' target.
.PP
\fImanifypods_target\fR
.IX Subsection "manifypods_target"
.PP
.Vb 1
\&  my $manifypods_target = $self\->manifypods_target;
.Ve
.PP
Generates the manifypods target.  This target generates man pages from
all \s-1POD\s0 files in \s-1MAN1PODS\s0 and \s-1MAN3PODS.\s0
.PP
\fImetafile_target\fR
.IX Subsection "metafile_target"
.PP
.Vb 1
\&    my $target = $mm\->metafile_target;
.Ve
.PP
Generate the metafile target.
.PP
Writes the file \s-1META\s0.yml (\s-1YAML\s0 encoded meta-data) and \s-1META\s0.json
(\s-1JSON\s0 encoded meta-data) about the module in the distdir.
The format follows Module::Build's as closely as possible.
.PP
\fImetafile_data\fR
.IX Subsection "metafile_data"
.PP
.Vb 1
\&    my $metadata_hashref = $mm\->metafile_data(\e%meta_add, \e%meta_merge);
.Ve
.PP
Returns the data which MakeMaker turns into the \s-1META\s0.yml file 
and the \s-1META\s0.json file. It is always in version 2.0 of the format.
.PP
Values of \f(CW%meta_add\fR will overwrite any existing metadata in those
keys.  \f(CW%meta_merge\fR will be merged with them.
.PP
\fImetafile_file\fR
.IX Subsection "metafile_file"
.PP
.Vb 1
\&    my $meta_yml = $mm\->metafile_file(@metadata_pairs);
.Ve
.PP
Turns the \f(CW@metadata_pairs\fR into \s-1YAML.\s0
.PP
This method does not implement a complete \s-1YAML\s0 dumper, being limited
to dump a hash with values which are strings, undef's or nested hashes
and arrays of strings. No quoting/escaping is done.
.PP
\fIdistmeta_target\fR
.IX Subsection "distmeta_target"
.PP
.Vb 1
\&    my $make_frag = $mm\->distmeta_target;
.Ve
.PP
Generates the distmeta target to add \s-1META\s0.yml and \s-1META\s0.json to the \s-1MANIFEST\s0
in the distdir.
.PP
\fImymeta\fR
.IX Subsection "mymeta"
.PP
.Vb 1
\&    my $mymeta = $mm\->mymeta;
.Ve
.PP
Generate \s-1MYMETA\s0 information as a hash either from an existing \s-1CPAN\s0 Meta file
(\s-1META\s0.json or \s-1META\s0.yml) or from internal data.
.PP
\fIwrite_mymeta\fR
.IX Subsection "write_mymeta"
.PP
.Vb 1
\&    $self\->write_mymeta( $mymeta );
.Ve
.PP
Write \s-1MYMETA\s0 information to \s-1MYMETA\s0.json and \s-1MYMETA\s0.yml.
.PP
\fIrealclean (o)\fR
.IX Subsection "realclean (o)"
.PP
Defines the realclean target.
.PP
\fIrealclean_subdirs_target\fR
.IX Subsection "realclean_subdirs_target"
.PP
.Vb 1
\&  my $make_frag = $MM\->realclean_subdirs_target;
.Ve
.PP
Returns the realclean_subdirs target.  This is used by the realclean
target to call realclean on any subdirectories which contain Makefiles.
.PP
\fIsignature_target\fR
.IX Subsection "signature_target"
.PP
.Vb 1
\&    my $target = $mm\->signature_target;
.Ve
.PP
Generate the signature target.
.PP
Writes the file \s-1SIGNATURE\s0 with \*(L"cpansign \-s\*(R".
.PP
\fIdistsignature_target\fR
.IX Subsection "distsignature_target"
.PP
.Vb 1
\&    my $make_frag = $mm\->distsignature_target;
.Ve
.PP
Generates the distsignature target to add \s-1SIGNATURE\s0 to the \s-1MANIFEST\s0 in the
distdir.
.PP
\fIspecial_targets\fR
.IX Subsection "special_targets"
.PP
.Vb 1
\&  my $make_frag = $mm\->special_targets
.Ve
.PP
Returns a make fragment containing any targets which have special
meaning to make.  For example, .SUFFIXES and .PHONY.
.SS "Init methods"
.IX Subsection "Init methods"
Methods which help initialize the MakeMaker object and macros.
.PP
\fIinit_ABSTRACT\fR
.IX Subsection "init_ABSTRACT"
.PP
.Vb 1
\&    $mm\->init_ABSTRACT
.Ve
.PP
\fIinit_INST\fR
.IX Subsection "init_INST"
.PP
.Vb 1
\&    $mm\->init_INST;
.Ve
.PP
Called by init_main.  Sets up all INST_* variables except those related
to \s-1XS\s0 code.  Those are handled in init_xs.
.PP
\fIinit_INSTALL\fR
.IX Subsection "init_INSTALL"
.PP
.Vb 1
\&    $mm\->init_INSTALL;
.Ve
.PP
Called by init_main.  Sets up all INSTALL_* variables (except
\&\s-1INSTALLDIRS\s0) and *PREFIX.
.PP
\fIinit_INSTALL_from_PREFIX\fR
.IX Subsection "init_INSTALL_from_PREFIX"
.PP
.Vb 1
\&  $mm\->init_INSTALL_from_PREFIX;
.Ve
.PP
\fIinit_from_INSTALL_BASE\fR
.IX Subsection "init_from_INSTALL_BASE"
.PP
.Vb 1
\&    $mm\->init_from_INSTALL_BASE
.Ve
.PP
\fIinit_VERSION  \fIAbstract\fI\fR
.IX Subsection "init_VERSION Abstract"
.PP
.Vb 1
\&    $mm\->init_VERSION
.Ve
.PP
Initialize macros representing versions of MakeMaker and other tools
.PP
\&\s-1MAKEMAKER:\s0 path to the MakeMaker module.
.PP
\&\s-1MM_VERSION:\s0 ExtUtils::MakeMaker Version
.PP
\&\s-1MM_REVISION:\s0 ExtUtils::MakeMaker version control revision (for backwards
             compat)
.PP
\&\s-1VERSION:\s0 version of your module
.PP
\&\s-1VERSION_MACRO:\s0 which macro represents the version (usually '\s-1VERSION\s0')
.PP
\&\s-1VERSION_SYM:\s0 like version but safe for use as an \s-1RCS\s0 revision number
.PP
\&\s-1DEFINE_VERSION:\s0 \-D line to set the module version when compiling
.PP
\&\s-1XS_VERSION:\s0 version in your .xs file.  Defaults to $(\s-1VERSION\s0)
.PP
\&\s-1XS_VERSION_MACRO:\s0 which macro represents the \s-1XS\s0 version.
.PP
\&\s-1XS_DEFINE_VERSION:\s0 \-D line to set the xs version when compiling.
.PP
Called by init_main.
.PP
\fIinit_tools\fR
.IX Subsection "init_tools"
.PP
.Vb 1
\&    $MM\->init_tools();
.Ve
.PP
Initializes the simple macro definitions used by \fBtools_other()\fR and
places them in the \f(CW$MM\fR object.  These use conservative cross platform
versions and should be overridden with platform specific versions for
performance.
.PP
Defines at least these macros.
.PP
.Vb 1
\&  Macro             Description
\&
\&  NOOP              Do nothing
\&  NOECHO            Tell make not to display the command itself
\&
\&  SHELL             Program used to run shell commands
\&
\&  ECHO              Print text adding a newline on the end
\&  RM_F              Remove a file
\&  RM_RF             Remove a directory
\&  TOUCH             Update a file\*(Aqs timestamp
\&  TEST_F            Test for a file\*(Aqs existence
\&  TEST_S            Test the size of a file
\&  CP                Copy a file
\&  CP_NONEMPTY       Copy a file if it is not empty
\&  MV                Move a file
\&  CHMOD             Change permissions on a file
\&  FALSE             Exit with non\-zero
\&  TRUE              Exit with zero
\&
\&  UMASK_NULL        Nullify umask
\&  DEV_NULL          Suppress all command output
.Ve
.PP
\fIinit_others\fR
.IX Subsection "init_others"
.PP
.Vb 1
\&    $MM\->init_others();
.Ve
.PP
Initializes the macro definitions having to do with compiling and
linking used by \fBtools_other()\fR and places them in the \f(CW$MM\fR object.
.PP
If there is no description, its the same as the parameter to
\&\fBWriteMakefile()\fR documented in ExtUtils::MakeMaker.
.PP
\fItools_other\fR
.IX Subsection "tools_other"
.PP
.Vb 1
\&    my $make_frag = $MM\->tools_other;
.Ve
.PP
Returns a make fragment containing definitions for the macros \fBinit_others()\fR
initializes.
.PP
\fIinit_DIRFILESEP  \fIAbstract\fI\fR
.IX Subsection "init_DIRFILESEP Abstract"
.PP
.Vb 2
\&  $MM\->init_DIRFILESEP;
\&  my $dirfilesep = $MM\->{DIRFILESEP};
.Ve
.PP
Initializes the \s-1DIRFILESEP\s0 macro which is the separator between the
directory and filename in a filepath.  ie. / on Unix, \e on Win32 and
nothing on \s-1VMS.\s0
.PP
For example:
.PP
.Vb 2
\&    # instead of $(INST_ARCHAUTODIR)/extralibs.ld
\&    $(INST_ARCHAUTODIR)$(DIRFILESEP)extralibs.ld
.Ve
.PP
Something of a hack but it prevents a lot of code duplication between
MM_* variants.
.PP
Do not use this as a separator between directories.  Some operating
systems use different separators between subdirectories as between
directories and filenames (for example:  VOLUME:[dir1.dir2]file on \s-1VMS\s0).
.PP
\fIinit_linker  \fIAbstract\fI\fR
.IX Subsection "init_linker Abstract"
.PP
.Vb 1
\&    $mm\->init_linker;
.Ve
.PP
Initialize macros which have to do with linking.
.PP
\&\s-1PERL_ARCHIVE:\s0 path to libperl.a equivalent to be linked to dynamic
extensions.
.PP
\&\s-1PERL_ARCHIVE_AFTER:\s0 path to a library which should be put on the
linker command line \fIafter\fR the external libraries to be linked to
dynamic extensions.  This may be needed if the linker is one-pass, and
Perl includes some overrides for C \s-1RTL\s0 functions, such as \fBmalloc()\fR.
.PP
\&\s-1EXPORT_LIST:\s0 name of a file that is passed to linker to define symbols
to be exported.
.PP
Some OSes do not need these in which case leave it blank.
.PP
\fIinit_platform\fR
.IX Subsection "init_platform"
.PP
.Vb 1
\&    $mm\->init_platform
.Ve
.PP
Initialize any macros which are for platform specific use only.
.PP
A typical one is the version number of your \s-1OS\s0 specific module.
(ie. MM_Unix_VERSION or \s-1MM_VMS_VERSION\s0).
.PP
\fIinit_MAKE\fR
.IX Subsection "init_MAKE"
.PP
.Vb 1
\&    $mm\->init_MAKE
.Ve
.PP
Initialize \s-1MAKE\s0 from either a \s-1MAKE\s0 environment variable or \f(CW$Config\fR{make}.
.SS "Tools"
.IX Subsection "Tools"
A grab bag of methods to generate specific macros and commands.
.PP
\fImanifypods\fR
.IX Subsection "manifypods"
.PP
Defines targets and routines to translate the pods into manpages and
put them into the INST_* directories.
.PP
\fIPOD2MAN_macro\fR
.IX Subsection "POD2MAN_macro"
.PP
.Vb 1
\&  my $pod2man_macro = $self\->POD2MAN_macro
.Ve
.PP
Returns a definition for the \s-1POD2MAN\s0 macro.  This is a program
which emulates the pod2man utility.  You can add more switches to the
command by simply appending them on the macro.
.PP
Typical usage:
.PP
.Vb 1
\&    $(POD2MAN) \-\-section=3 \-\-perm_rw=$(PERM_RW) podfile1 man_page1 ...
.Ve
.PP
\fItest_via_harness\fR
.IX Subsection "test_via_harness"
.PP
.Vb 1
\&  my $command = $mm\->test_via_harness($perl, $tests);
.Ve
.PP
Returns a \f(CW$command\fR line which runs the given set of \f(CW$tests\fR with
Test::Harness and the given \f(CW$perl\fR.
.PP
Used on the t/*.t files.
.PP
\fItest_via_script\fR
.IX Subsection "test_via_script"
.PP
.Vb 1
\&  my $command = $mm\->test_via_script($perl, $script);
.Ve
.PP
Returns a \f(CW$command\fR line which just runs a single test without
Test::Harness.  No checks are done on the results, they're just
printed.
.PP
Used for test.pl, since they don't always follow Test::Harness
formatting.
.PP
\fItool_autosplit\fR
.IX Subsection "tool_autosplit"
.PP
Defines a simple perl call that runs autosplit. May be deprecated by
pm_to_blib soon.
.PP
\fIarch_check\fR
.IX Subsection "arch_check"
.PP
.Vb 4
\&    my $arch_ok = $mm\->arch_check(
\&        $INC{"Config.pm"},
\&        File::Spec\->catfile($Config{archlibexp}, "Config.pm")
\&    );
.Ve
.PP
A sanity check that what Perl thinks the architecture is and what
Config thinks the architecture is are the same.  If they're not it
will return false and show a diagnostic message.
.PP
When building Perl it will always return true, as nothing is installed
yet.
.PP
The interface is a bit odd because this is the result of a
quick refactoring.  Don't rely on it.
.SS "File::Spec wrappers"
.IX Subsection "File::Spec wrappers"
ExtUtils::MM_Any is a subclass of File::Spec.  The methods noted here
override File::Spec.
.PP
\fIcatfile\fR
.IX Subsection "catfile"
.PP
File::Spec <= 0.83 has a bug where the file part of catfile is not
canonicalized.  This override fixes that bug.
.SS "Misc"
.IX Subsection "Misc"
Methods I can't really figure out where they should go yet.
.PP
\fIfind_tests\fR
.IX Subsection "find_tests"
.PP
.Vb 1
\&  my $test = $mm\->find_tests;
.Ve
.PP
Returns a string suitable for feeding to the shell to return all
tests in t/*.t.
.PP
\fIfind_tests_recursive\fR
.IX Subsection "find_tests_recursive"
.PP
.Vb 1
\&  my $tests = $mm\->find_tests_recursive;
.Ve
.PP
Returns a string suitable for feeding to the shell to return all
tests in t/ but recursively. Equivalent to
.PP
.Vb 1
\&  my $tests = $mm\->find_tests_recursive_in(\*(Aqt\*(Aq);
.Ve
.PP
\fIfind_tests_recursive_in\fR
.IX Subsection "find_tests_recursive_in"
.PP
.Vb 1
\&  my $tests = $mm\->find_tests_recursive_in($dir);
.Ve
.PP
Returns a string suitable for feeding to the shell to return all
tests in \f(CW$dir\fR recursively.
.PP
\fIextra_clean_files\fR
.IX Subsection "extra_clean_files"
.PP
.Vb 1
\&    my @files_to_clean = $MM\->extra_clean_files;
.Ve
.PP
Returns a list of \s-1OS\s0 specific files to be removed in the clean target in
addition to the usual set.
.PP
\fIinstallvars\fR
.IX Subsection "installvars"
.PP
.Vb 1
\&    my @installvars = $mm\->installvars;
.Ve
.PP
A list of all the INSTALL* variables without the \s-1INSTALL\s0 prefix.  Useful
for iteration or building related variable sets.
.PP
\fIlibscan\fR
.IX Subsection "libscan"
.PP
.Vb 1
\&  my $wanted = $self\->libscan($path);
.Ve
.PP
Takes a path to a file or dir and returns an empty string if we don't
want to include this file in the library.  Otherwise it returns the
the \f(CW$path\fR unchanged.
.PP
Mainly used to exclude version control administrative directories
and base-level \fI\s-1README\s0.pod\fR from installation.
.PP
\fIplatform_constants\fR
.IX Subsection "platform_constants"
.PP
.Vb 1
\&    my $make_frag = $mm\->platform_constants
.Ve
.PP
Returns a make fragment defining all the macros initialized in
\&\fBinit_platform()\fR rather than put them in \fBconstants()\fR.
.PP
\fIpost_constants (o)\fR
.IX Subsection "post_constants (o)"
.PP
Returns an empty string per default. Dedicated to overrides from
within Makefile.PL after all constants have been defined.
.PP
\fIpost_initialize (o)\fR
.IX Subsection "post_initialize (o)"
.PP
Returns an empty string per default. Used in Makefile.PLs to add some
chunk of text to the Makefile after the object is initialized.
.PP
\fIpostamble (o)\fR
.IX Subsection "postamble (o)"
.PP
Returns an empty string. Can be used in Makefile.PLs to write some
text to the Makefile at the end.
.SH "AUTHOR"
.IX Header "AUTHOR"
Michael G Schwern <schwern@pobox.com> and the denizens of
makemaker@perl.org with code from ExtUtils::MM_Unix and
ExtUtils::MM_Win32.