/
MakeMaker.pod
4100 lines (2590 loc) · 103 KB
/
MakeMaker.pod
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
=encoding euc-jp
=head1 NAME
=begin original
ExtUtils::MakeMaker - Create a module Makefile
=end original
ExtUtils::MakeMaker - モジュール用 Makefile の生成
(訳注: (TBR)がついている段落は「みんなの自動翻訳@TexTra」による
機械翻訳です。)
=head1 SYNOPSIS
use ExtUtils::MakeMaker;
WriteMakefile( ATTRIBUTE => VALUE [, ...] );
=head1 DESCRIPTION
=begin original
This utility is designed to write a Makefile for an extension module
from a Makefile.PL. It is based on the Makefile.SH model provided by
Andy Dougherty and the perl5-porters.
=end original
このユーティリティは Makefile.PL において拡張モジュールのための
Makefile を書くために設計されています。
これは、Andy Dougherty 及び perl5-porter による Makefile.SH を
基盤としています。
=begin original
It splits the task of generating the Makefile into several subroutines
that can be individually overridden. Each subroutine returns the text
it wishes to have written to the Makefile.
=end original
これは Makefile を生成する処理を独立してオーバーライド可能ないくつかの
関数に分解します。
各関数では Makefile に書かれる内容をテキストとして
返します。
=begin original
MakeMaker is object oriented. Each directory below the current
directory that contains a Makefile.PL is treated as a separate
object. This makes it possible to write an unlimited number of
Makefiles with a single invocation of WriteMakefile().
=end original
MakeMaker はオブジェクト指向です。
Makefile.PL を含んでいるカレントディレクトリにある各ディレクトリは
分割されたオブジェクトとして扱われます。
これは一度の WriteMakefile() 呼び出しから無制限個の Makefile を
出力することを可能にしています。
=head2 How To Write A Makefile.PL
(Makefile.PL の書き方)
=begin original
See ExtUtils::MakeMaker::Tutorial.
=end original
L<ExtUtils::MakeMaker::Tutorial> を参照してください。
=begin original
The long answer is the rest of the manpage :-)
=end original
そしてこのマニュアルページの残りの部分が長い答えになります :-)
=head2 Default Makefile Behaviour
(デフォルトの Makefile の振る舞い)
=begin original
The generated Makefile enables the user of the extension to invoke
=end original
生成された Makefile は呼び出しの拡張を有効にします
perl Makefile.PL # optionally "perl Makefile.PL verbose"
make
make test # optionally set TEST_VERBOSE=1
make install # See below
=begin original
The Makefile to be produced may be altered by adding arguments of the
form C<KEY=VALUE>. E.g.
=end original
生成された Makefile は C<KEY=VALUE> 形式の引数を与えることで
その動作を変えることができます。
例:
perl Makefile.PL INSTALL_BASE=~
=begin original
Other interesting targets in the generated Makefile are
=end original
生成された Makefile の持つターゲットの一例として
次のようなものがあります:
=begin original
make config # to check if the Makefile is up-to-date
make clean # delete local temp files (Makefile gets renamed)
make realclean # delete derived files (including ./blib)
make ci # check in all the files in the MANIFEST file
make dist # see below the Distribution Support section
=end original
make config # Makefile が最新版かどうかを確認する
make clean # ローカルの一時ファイルを削除する (Makefile はリネームする)
make realclean # (./blib を含む) 派生ファイルを削除する
make ci # MANIFEST ファイルにある全てのファイルを確認する
make dist # 以下の Distribution Support 節を参照
=head2 make test
=begin original
MakeMaker checks for the existence of a file named F<test.pl> in the
current directory and if it exists it execute the script with the
proper set of perl C<-I> options.
=end original
MakeMaker は、カレントディレクトリに F<test.pl> という名前のファイルの存在を
チェックし、存在するなら、適切に perl C<-I> オプションを設定して、
このスクリプトを実行します。
=begin original
MakeMaker also checks for any files matching glob("t/*.t"). It will
execute all matching files in alphabetical order via the
L<Test::Harness> module with the C<-I> switches set correctly.
=end original
MakeMaker はまた、glob("t/*.t") にマッチングするファイルもチェックします。
マッチングした全てのファイルはアルファベット順に、C<-I> オプションを
正しく設定して L<Test::Harness> モジュールで実行されます。
=begin original
If you'd like to see the raw output of your tests, set the
C<TEST_VERBOSE> variable to true.
=end original
テストの生出力を見たい場合は、C<TEST_VERBOSE> 変数を真に設定してください。
make test TEST_VERBOSE=1
=head2 make testdb
=begin original
A useful variation of the above is the target C<testdb>. It runs the
test under the Perl debugger (see L<perldebug>). If the file
F<test.pl> exists in the current directory, it is used for the test.
=end original
前述のターゲット C<testdb> の便利な変種です。
これはテストを Perl デバッガ (L<perldebug> 参照) の基で実行します。
F<test.pl> ファイルがカレントディレクトリにあるなら、
これがテストに使われます。
=begin original
If you want to debug some other testfile, set the C<TEST_FILE> variable
thusly:
=end original
その他のテストファイルをデバッグしたい場合は、
C<TEST_FILE> 変数を設定してください:
make testdb TEST_FILE=t/mytest.t
=begin original
By default the debugger is called using C<-d> option to perl. If you
want to specify some other option, set the C<TESTDB_SW> variable:
=end original
デフォルトでは、perl に C<-d> オプションを使うことでデバッガが呼び出されます。
その他のオプションを指定したい場合は、C<TESTDB_SW> 変数を設定してください:
make testdb TESTDB_SW=-Dx
=head2 make install
=begin original
make alone puts all relevant files into directories that are named by
the macros INST_LIB, INST_ARCHLIB, INST_SCRIPT, INST_MAN1DIR and
INST_MAN3DIR. All these default to something below ./blib if you are
I<not> building below the perl source directory. If you I<are>
building below the perl source, INST_LIB and INST_ARCHLIB default to
../../lib, and INST_SCRIPT is not defined.
=end original
make単独では、マクロINST_LIB、INST_ARCHLIB、INST_SCRIPT、INST_MAN1DIR、およびINST_MAN3DIRによって名前が付けられたディレクトリにすべての関連ファイルが置かれます。
perlソースディレクトリの下に構築<しない>場合、これらはすべてデフォルトで./blib以下になります。
perlソースの下に構築<しない>場合、INST_LIBおよびINST_ARCHLIBはデフォルトで././libになり、INST_SCRIPTは定義されません。
(TBR)
=begin original
The I<install> target of the generated Makefile copies the files found
below each of the INST_* directories to their INSTALL*
counterparts. Which counterparts are chosen depends on the setting of
INSTALLDIRS according to the following table:
=end original
生成されたMakefileのI<install>ターゲットは、各INST_*ディレクトリの下にあるファイルを対応するINSTALL*ディレクトリにコピーします。
どのディレクトリが選択されるかは、次の表に従ってINSTALLDIRSの設定によって決まります。
(TBR)
INSTALLDIRS set to
perl site vendor
PERLPREFIX SITEPREFIX VENDORPREFIX
INST_ARCHLIB INSTALLARCHLIB INSTALLSITEARCH INSTALLVENDORARCH
INST_LIB INSTALLPRIVLIB INSTALLSITELIB INSTALLVENDORLIB
INST_BIN INSTALLBIN INSTALLSITEBIN INSTALLVENDORBIN
INST_SCRIPT INSTALLSCRIPT INSTALLSITESCRIPT INSTALLVENDORSCRIPT
INST_MAN1DIR INSTALLMAN1DIR INSTALLSITEMAN1DIR INSTALLVENDORMAN1DIR
INST_MAN3DIR INSTALLMAN3DIR INSTALLSITEMAN3DIR INSTALLVENDORMAN3DIR
=begin original
The INSTALL... macros in turn default to their %Config
($Config{installprivlib}, $Config{installarchlib}, etc.) counterparts.
=end original
INSTALL.マクロのデフォルトは、対応する%Config($Config{installprivlib}、$Config{installarchlib}など)になります。
(TBR)
=begin original
You can check the values of these variables on your system with
=end original
システム上のこれらの変数の値をチェックするには
(TBR)
perl '-V:install.*'
=begin original
And to check the sequence in which the library directories are
searched by perl, run
=end original
perlがライブラリディレクトリを検索する順序をチェックするには、次のコマンドを実行します。
(TBR)
perl -le 'print join $/, @INC'
=begin original
Sometimes older versions of the module you're installing live in other
directories in @INC. Because Perl loads the first version of a module it
finds, not the newest, you might accidentally get one of these older
versions even after installing a brand new version. To delete I<all other
versions of the module you're installing> (not simply older ones) set the
C<UNINST> variable.
=end original
Sometimes older versions of the module you're installing live in other
directories in @INC. Because Perl loads the first version of a module it
finds, not the newest, you might accidentally get one of these older
versions even after installing a brand new version. To delete I<all other
versions of the module you're installing> (not simply older ones) set the
C<UNINST> variable.
(TBT)
make install UNINST=1
=head2 INSTALL_BASE
=begin original
INSTALL_BASE can be passed into Makefile.PL to change where your
module will be installed. INSTALL_BASE is more like what everyone
else calls "prefix" than PREFIX is.
=end original
INSTALL_BASE can be passed into Makefile.PL to change where your
module will be installed. INSTALL_BASE is more like what everyone
else calls "prefix" than PREFIX is.
(TBT)
=begin original
To have everything installed in your home directory, do the following.
=end original
全てをホームディレクトリにインストールされるようにするには、
次のようにします:
# Unix users, INSTALL_BASE=~ works fine
perl Makefile.PL INSTALL_BASE=/path/to/your/home/dir
=begin original
Like PREFIX, it sets several INSTALL* attributes at once. Unlike
PREFIX it is easy to predict where the module will end up. The
installation pattern looks like this:
=end original
Like PREFIX, it sets several INSTALL* attributes at once. Unlike
PREFIX it is easy to predict where the module will end up. The
installation pattern looks like this:
(TBT)
INSTALLARCHLIB INSTALL_BASE/lib/perl5/$Config{archname}
INSTALLPRIVLIB INSTALL_BASE/lib/perl5
INSTALLBIN INSTALL_BASE/bin
INSTALLSCRIPT INSTALL_BASE/bin
INSTALLMAN1DIR INSTALL_BASE/man/man1
INSTALLMAN3DIR INSTALL_BASE/man/man3
=begin original
INSTALL_BASE in MakeMaker and C<--install_base> in Module::Build (as
of 0.28) install to the same location. If you want MakeMaker and
Module::Build to install to the same location simply set INSTALL_BASE
and C<--install_base> to the same location.
=end original
INSTALL_BASE in MakeMaker and C<--install_base> in Module::Build (as
of 0.28) install to the same location. If you want MakeMaker and
Module::Build to install to the same location simply set INSTALL_BASE
and C<--install_base> to the same location.
(TBT)
=begin original
INSTALL_BASE was added in 6.31.
=end original
INSTALL_BASE は 6.31 で追加されました。
=head2 PREFIX and LIB attribute
(PREFIX 及び LIB 属性)
=begin original
PREFIX and LIB can be used to set several INSTALL* attributes in one
go. Here's an example for installing into your home directory.
=end original
PREFIX 及び LIB を使っていくつかの INSTALL* 属性を一度に
変更することができます。
あなたのホームディレクトリにインストールする例は
次のようになります:
# Unix users, PREFIX=~ works fine
perl Makefile.PL PREFIX=/path/to/your/home/dir
=begin original
This will install all files in the module under your home directory,
with man pages and libraries going into an appropriate place (usually
~/man and ~/lib). How the exact location is determined is complicated
and depends on how your Perl was configured. INSTALL_BASE works more
like what other build systems call "prefix" than PREFIX and we
recommend you use that instead.
=end original
これはモジュール内のファイルをホームディレクトリ上に、
マニュアルページやライブラリを適切な位置(通常 ~/man 及び ~/lib)に
インストールします。
正確な位置がどのように決定されるかは複雑で、Perl がどのように
設定されているかによります。
INSTALL_BASE は PREFIX より、その他のビルドシステムが
"prefix" と読んでいるものにより近く、私達は
これを使うことを勧めます。
=begin original
Another way to specify many INSTALL directories with a single
parameter is LIB.
=end original
単一のパラメータからいくつかのインストールディレクトリを変更する
ものとしては他に LIB があります。
perl Makefile.PL LIB=~/lib
=begin original
This will install the module's architecture-independent files into
~/lib, the architecture-dependent files into ~/lib/$archname.
=end original
これはモジュールのアーキテクチャ非依存ファイルを ~/lib に、
アーキテクチャ依存ファイルを ~/lib/$archname にインストールします。
=begin original
Note, that in both cases the tilde expansion is done by MakeMaker, not
by perl by default, nor by make.
=end original
これら共にチルダの展開はデフォルトでは perl や make によってではなく
MakeMaker によって行われることに注意してください。
=begin original
Conflicts between parameters LIB, PREFIX and the various INSTALL*
arguments are resolved so that:
=end original
LIB, PREFIX パラメータや INSTALL* 引数の衝突時には次の順に解決されます:
=over 4
=item *
=begin original
setting LIB overrides any setting of INSTALLPRIVLIB, INSTALLARCHLIB,
INSTALLSITELIB, INSTALLSITEARCH (and they are not affected by PREFIX);
=end original
LIB を設定すると、INSTALLPRIVLIB, INSTALLARCHLIB, INSTALLSITELIB,
INSTALLSITEARCH に対する設定を上書きします
(また、これらは PREFIX の影響を受けなくなります);
=item *
=begin original
without LIB, setting PREFIX replaces the initial C<$Config{prefix}>
part of those INSTALL* arguments, even if the latter are explicitly
set (but are set to still start with C<$Config{prefix}>).
=end original
LIB の設定がなければ、PREFIX は これら INSTALL* 引数の最初の
C<$Config{prefix}> 箇所を置き換えます;
これは INSTALL* 引数が
明示的に設定されていても(C<$Config{prefix}>ではじまっているのなら)
行われます。
=back
=begin original
If the user has superuser privileges, and is not working on AFS or
relatives, then the defaults for INSTALLPRIVLIB, INSTALLARCHLIB,
INSTALLSCRIPT, etc. will be appropriate, and this incantation will be
the best:
=end original
ユーザがスーパーユーザー権限を持っていてかつ、AFS やその同類で
処理していないのなら、INSTALLPRIVLIB, INSTALLARCHLIB, INSTALLSCRIPT 等は
適切に設定されます;
これは最良の動作でしょう。
perl Makefile.PL;
make;
make test
make install
=begin original
make install per default writes some documentation of what has been
done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This feature
can be bypassed by calling make pure_install.
=end original
デフォルトの make install は行った動作を
C<$(INSTALLARCHLIB)/perllocal.pod> に書き出します。
この機能は make pure_install を使うことで回避できます。
=head2 AFS users
(AFS ユーザー)
=begin original
will have to specify the installation directories as these most
probably have changed since perl itself has been installed. They will
have to do this by calling
=end original
インストールディレクトリを指定する必要があります。
perl自体がインストールされてから変更された可能性が高いためです。
(TBR)
perl Makefile.PL INSTALLSITELIB=/afs/here/today \
INSTALLSCRIPT=/afs/there/now INSTALLMAN3DIR=/afs/for/manpages
make
=begin original
Be careful to repeat this procedure every time you recompile an
extension, unless you are sure the AFS installation directories are
still valid.
=end original
AFSのインストールディレクトリーがまだ有効であることが確実でない限り、拡張機能を再コンパイルするたびにこの手順を繰り返すように注意してください。
(TBR)
=head2 Static Linking of a new Perl Binary
(新しい Perl 実行形式のスタティックリンク)
=begin original
An extension that is built with the above steps is ready to use on
systems supporting dynamic loading. On systems that do not support
dynamic loading, any newly created extension has to be linked together
with the available resources. MakeMaker supports the linking process
by creating appropriate targets in the Makefile whenever an extension
is built. You can invoke the corresponding section of the makefile with
=end original
上記の手順でビルドされた拡張機能は、動的ロードをサポートするシステムで使用できます。
動的ロードをサポートしないシステムでは、新しく作成された拡張機能はすべて、使用可能なリソースとともにリンクする必要があります。
MakeMakerは、拡張機能がビルドされるたびにMakefileに適切なターゲットを作成することによって、リンクプロセスをサポートします。
メイクファイルの対応するセクションを呼び出すには
(TBR)
make perl
=begin original
That produces a new perl binary in the current directory with all
extensions linked in that can be found in INST_ARCHLIB, SITELIBEXP,
and PERL_ARCHLIB. To do that, MakeMaker writes a new Makefile, on
UNIX, this is called Makefile.aperl (may be system dependent). If you
want to force the creation of a new perl, it is recommended, that you
delete this Makefile.aperl, so the directories are searched-through
for linkable libraries again.
=end original
これにより、INST_ARCHLIB、SITELIBEXP、およびPERL_ARCHLIBにあるすべての拡張子がリンクされた新しいperlバイナリが現在のディレクトリに作成されます。
そのために、MakeMakerは新しいMakefileを作成します。
UNIXでは、これはMakefile.aperlと呼ばれます(システムに依存する場合があります)。
新しいperlを強制的に作成する場合は、このMakefile.aperlを削除することをお勧めします。
削除すると、ディレクトリ内でリンク可能なライブラリが再度検索されます。
(TBR)
=begin original
The binary can be installed into the directory where perl normally
resides on your machine with
=end original
バイナリは、perlが通常マシン上に存在するディレクトリにインストールできます。
(TBR)
make inst_perl
=begin original
To produce a perl binary with a different name than C<perl>, either say
=end original
C<perl>とは異なる名前のperlバイナリを生成するには、次のいずれかを実行します。
(TBR)
perl Makefile.PL MAP_TARGET=myperl
make myperl
make inst_perl
=begin original
or say
=end original
または
(TBR)
perl Makefile.PL
make myperl MAP_TARGET=myperl
make inst_perl MAP_TARGET=myperl
=begin original
In any case you will be prompted with the correct invocation of the
C<inst_perl> target that installs the new binary into INSTALLBIN.
=end original
いずれの場合も、新しいバイナリをINSTALLBINにインストールするC<inst_perl>ターゲットを正しく起動するように求められます。
(TBR)
=begin original
make inst_perl per default writes some documentation of what has been
done into the file C<$(INSTALLARCHLIB)/perllocal.pod>. This
can be bypassed by calling make pure_inst_perl.
=end original
make inst_perlはデフォルトでC<$(INSTALLARCHLIB)/perllocal.pod>ファイルに何が行われたかの文書を書き込みます。
これはmake pure_inst_perlを呼び出すことでバイパスできます。
(TBR)
=begin original
Warning: the inst_perl: target will most probably overwrite your
existing perl binary. Use with care!
=end original
警告:inst_perl:targetは既存のperlバイナリを上書きする可能性があります。
注意して使用してください。
(TBR)
=begin original
Sometimes you might want to build a statically linked perl although
your system supports dynamic loading. In this case you may explicitly
set the linktype with the invocation of the Makefile.PL or make:
=end original
システムが動的ロードをサポートしていても、静的にリンクされたperlを構築したい場合があります。
この場合は、Makefile.PLまたはmakeの呼び出しでリンクタイプを明示的に設定できます。
(TBR)
perl Makefile.PL LINKTYPE=static # recommended
=begin original
or
=end original
または
make LINKTYPE=static # works on most systems
=head2 Determination of Perl Library and Installation Locations
(Perl ライブラリとインストール位置の決定)
=begin original
MakeMaker needs to know, or to guess, where certain things are
located. Especially INST_LIB and INST_ARCHLIB (where to put the files
during the make(1) run), PERL_LIB and PERL_ARCHLIB (where to read
existing modules from), and PERL_INC (header files and C<libperl*.*>).
=end original
特にINST_LIBとINST_ARCHLIB(make(1)の実行中にファイルを置く場所)、PERL_LIBとPERL_ARCHLIB(既存のモジュールを読み取る場所)、そしてPERL_INC(ヘッダーファイルとC<libperl*.*>)です。
(TBR)
=begin original
Extensions may be built either using the contents of the perl source
directory tree or from the installed perl library. The recommended way
is to build extensions after you have run 'make install' on perl
itself. You can do that in any directory on your hard disk that is not
below the perl source tree. The support for extensions below the ext
directory of the perl distribution is only good for the standard
extensions that come with perl.
=end original
拡張機能は、perlソースディレクトリツリーの内容を使用するか、インストールされたperlライブラリから構築できます。
推奨される方法は、perl自体に対して'make install'を実行した後に拡張機能を構築することです。
perlソースツリーの下にないハードディスク上の任意のディレクトリでそれを行うことができます。
perlディストリビューションのextディレクトリの下の拡張機能のサポートは、perlに付属の標準拡張機能に対してのみ有効です。
(TBR)
=begin original
If an extension is being built below the C<ext/> directory of the perl
source then MakeMaker will set PERL_SRC automatically (e.g.,
C<../..>). If PERL_SRC is defined and the extension is recognized as
a standard extension, then other variables default to the following:
=end original
拡張がperlソースのC<ext/>ディレクトリの下に構築される場合、MakeMakerは自動的にPERL_SRCを設定します(例:C<./.>)。
PERL_SRCが定義され、拡張が標準拡張として認識される場合、その他の変数はデフォルトで次のようになります。
(TBR)
PERL_INC = PERL_SRC
PERL_LIB = PERL_SRC/lib
PERL_ARCHLIB = PERL_SRC/lib
INST_LIB = PERL_LIB
INST_ARCHLIB = PERL_ARCHLIB
=begin original
If an extension is being built away from the perl source then MakeMaker
will leave PERL_SRC undefined and default to using the installed copy
of the perl library. The other variables default to the following:
=end original
拡張機能がperlソースからビルドされる場合、MakeMakerはPERL_SRCを未定義のままにし、インストールされたperlライブラリのコピーをデフォルトで使用します。
その他の変数のデフォルトは次のとおりです。
(TBR)
PERL_INC = $archlibexp/CORE
PERL_LIB = $privlibexp
PERL_ARCHLIB = $archlibexp
INST_LIB = ./blib/lib
INST_ARCHLIB = ./blib/arch
=begin original
If perl has not yet been installed then PERL_SRC can be defined on the
command line as shown in the previous section.
=end original
perlがまだインストールされていない場合は、前のセクションで示したように、コマンドラインでPERL_SRCを定義できます。
(TBR)
=head2 Which architecture dependent directory?
(アーキテクチャ依存ディレクトリの位置)
=begin original
If you don't want to keep the defaults for the INSTALL* macros,
MakeMaker helps you to minimize the typing needed: the usual
relationship between INSTALLPRIVLIB and INSTALLARCHLIB is determined
by Configure at perl compilation time. MakeMaker supports the user who
sets INSTALLPRIVLIB. If INSTALLPRIVLIB is set, but INSTALLARCHLIB not,
then MakeMaker defaults the latter to be the same subdirectory of
INSTALLPRIVLIB as Configure decided for the counterparts in %Config ,
otherwise it defaults to INSTALLPRIVLIB. The same relationship holds
for INSTALLSITELIB and INSTALLSITEARCH.
=end original
INSTALL*マクロのデフォルトを維持したくない場合は、MakeMakerを使用すると、必要な入力を最小限に抑えることができます。
INSTALLPRIVLIBとINSTALLARCHLIBの通常の関係は、perlのコンパイル時にConfigureによって決定されます。
MakeMakerは、INSTALLPRIVLIBを設定するユーザーをサポートします。
INSTALLPRIVLIBが設定されていてもINSTALLARCHLIBが設定されていない場合、MakeMakerは、%Configで対応するものに対して決定されたConfigureと同じINSTALLPRIVLIBのサブディレクトリをデフォルトにします。
それ以外の場合は、INSTALLPRIVLIBがデフォルトになります。
同じ関係がINSTALLSITELIBとINSTALLSITEARCHにも適用されます。
(TBR)
=begin original
MakeMaker gives you much more freedom than needed to configure
internal variables and get different results. It is worth to mention,
that make(1) also lets you configure most of the variables that are
used in the Makefile. But in the majority of situations this will not
be necessary, and should only be done if the author of a package
recommends it (or you know what you're doing).
=end original
MakeMakerは、内部変数を設定し、異なる結果を得るために必要なものよりもはるかに多くの自由度を提供します。
言及する価値があるのは、make(1)では、Makefileで使用されるほとんどの変数も設定できることです。
しかし、ほとんどの場合、これは必要ではなく、パッケージの作成者が推奨する場合(またはあなたが何をしているかを知っている場合)にのみ行うべきです。
(TBR)
=head2 Using Attributes and Parameters
(属性とパラメータの使用)
=begin original
The following attributes may be specified as arguments to WriteMakefile()
or as NAME=VALUE pairs on the command line.
=end original
以下の属性が、WriteMakefile() への引数、またはコマンドラインでの
NAME=VALUE の組として指定できます。
=over 2
=item ABSTRACT
=begin original
One line description of the module. Will be included in PPD file.
=end original
モジュールの 1 行説明。
PPD ファイルに含まれます。
=item ABSTRACT_FROM
=begin original
Name of the file that contains the package description. MakeMaker looks
for a line in the POD matching /^($package\s-\s)(.*)/. This is typically
the first line in the "=head1 NAME" section. $2 becomes the abstract.
=end original
パッケージの説明が含まれているファイルの名前。
MakeMaker は POD の中で /^($package\s-\s)(.*)/ にマッチングする行を探します。
これは典型的には "=head1 NAME" 節の最初の行です。
$2 は概要になります。
=item AUTHOR
=begin original
String containing name (and email address) of package author(s). Is used
in PPD (Perl Package Description) files for PPM (Perl Package Manager).
=end original
パッケージ作者の名前 (および電子メールアドレス) を含む文字列。
PPM (Perl Package Manager) のための PPD (Perl Package Description) ファイルに
使われます。
=item BINARY_LOCATION
=begin original
Used when creating PPD files for binary packages. It can be set to a
full or relative path or URL to the binary archive for a particular
architecture. For example:
=end original
バイナリパッケージのための PPD ファイルを使うのに使われます。
特定のアーキテクチャのためのバイナリアーカイブへの完全または相対パス、
あるいは URL を設定できます。
例えば:
perl Makefile.PL BINARY_LOCATION=x86/Agent.tar.gz
=begin original
builds a PPD package that references a binary of the C<Agent> package,
located in the C<x86> directory relative to the PPD itself.
=end original
とすると、PPD 自身からの相対で C<x86> ディレクトリにある C<Agent>
パッケージのバイナリを参照する PPD パッケージをビルドします。
=item BUILD_REQUIRES
=begin original
A hash of modules that are needed to build your module but not run it.
=end original
あなたのモジュールをビルドするのには必要だけれども、実行には不要な
モジュールのハッシュ。
=begin original
This will go into the C<build_requires> field of your F<META.yml>.
=end original
これは F<META.yml> の C<build_requires> フィールドになります。
=begin original
The format is the same as PREREQ_PM.
=end original
形式は PREREQ_PM と同じです。
=item C
=begin original
Ref to array of *.c file names. Initialised from a directory scan
and the values portion of the XS attribute hash. This is not
currently used by MakeMaker but may be handy in Makefile.PLs.
=end original
*.c ファイル名の配列へのリファレンス。
ディレクトリスキャンと XS 属性ハッシュの値部分から初期化されます。
これは現在のところ MakeMaker は使っていませんが、
Makefile.PL 群では有用です。
=item CCFLAGS
=begin original
String that will be included in the compiler call command line between
the arguments INC and OPTIMIZE.
=end original
引数 INC と OPTIMIZE の間のコンパイラ呼び出しコマンドに含まれる文字列。
=item CONFIG
=begin original
Arrayref. E.g. [qw(archname manext)] defines ARCHNAME & MANEXT from
config.sh. MakeMaker will add to CONFIG the following values anyway:
ar
cc
cccdlflags
ccdlflags
dlext
dlsrc
ld
lddlflags
ldflags
libc
lib_ext
obj_ext
ranlib
sitelibexp
sitearchexp
so
=end original
配列へのリファレンス。
例えば [qw(archname manext)] は config.sh から ARCHNAME と MANEXT を
定義します。
MakeMaker はどちらにしろ次の値を CONFIG に追加します:
ar
cc
cccdlflags
ccdlflags
dlext
dlsrc
ld
lddlflags
ldflags
libc
lib_ext
obj_ext
ranlib
sitelibexp
sitearchexp
so
=item CONFIGURE