Skip to content

Commit 76b7a97

Browse files
authored
win32: remove makefile.mk (#18511)
Makefile.mk is redundant with GNUmakefile. See https://www.nntp.perl.org/group/perl.perl5.porters/2021/01/msg258848.html for more details. We planned to remove it shortly after the introduction of GNUmakefile but that slipped through the cracks for some reason: #14341
1 parent 341a561 commit 76b7a97

15 files changed

+28
-2024
lines changed

MANIFEST

-1
Original file line numberDiff line numberDiff line change
@@ -6280,7 +6280,6 @@ win32/include/sys/errno2.h Win32 port
62806280
win32/include/sys/socket.h Win32 port
62816281
win32/list_static_libs.pl prints libraries for static linking
62826282
win32/Makefile Win32 makefile for NMAKE (Visual C++ build)
6283-
win32/makefile.mk Win32 makefile for DMAKE (BC++, VC++ builds)
62846283
win32/perlexe.ico perlexe.ico image file
62856284
win32/perlexe.manifest Assembly manifest file
62866285
win32/perlexe.rc associated perl binary with icon

Porting/add-package.pl

+2-2
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,11 @@
319319
}
320320
}
321321
322-
### add entries to win32/Makefile and win32/makefile.mk
322+
### add entries to win32/Makefile
323323
### they contain the following lines:
324324
# ./win32/makefile.mk: ..\utils\ptardiff \
325325
# ./win32/makefile.mk: xsubpp instmodsh prove ptar ptardiff
326-
for my $file ( qw[win32/Makefile win32/makefile.mk] ) {
326+
for my $file ( qw[win32/Makefile] ) {
327327
unless ( `grep $bin $Repo/$file` ) {
328328
print " Adding $bin entries to $file..." if $Verbose;
329329

Porting/makerel

-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ my @writables = qw(
303303
lib/warnings.pm
304304
win32/GNUmakefile
305305
win32/Makefile
306-
win32/makefile.mk
307306
win32/config_H.gc
308307
win32/config_H.vc
309308
uconfig.h

Porting/pod_lib.pl

-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ =head2 C<verify_contiguous()>
186186
manifest => 'MANIFEST',
187187
vms => 'vms/descrip_mms.template',
188188
nmake => 'win32/Makefile',
189-
dmake => 'win32/makefile.mk',
190189
gmake => 'win32/GNUmakefile',
191190
podmak => 'win32/pod.mak',
192191
unix => 'Makefile.SH',

Porting/pod_rules.pl

-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
manifest => 'MANIFEST',
2525
vms => 'vms/descrip_mms.template',
2626
nmake => 'win32/Makefile',
27-
dmake => 'win32/makefile.mk',
2827
gmake => 'win32/GNUmakefile',
2928
podmak => 'win32/pod.mak',
3029
unix => 'Makefile.SH',
@@ -165,7 +164,6 @@ sub do_nmake {
165164
}
166165

167166
# shut up used only once warning
168-
*do_dmake = *do_dmake = \&do_nmake;
169167
*do_gmake = *do_gmake = \&do_nmake;
170168

171169
sub do_podmak {

README.cygwin

+1-1
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ be kept as clean as possible.
598598
plan9/mkfile
599599
hints/uwin.sh
600600
vms/descrip_mms.template
601-
win32/Makefile win32/makefile.mk
601+
win32/Makefile
602602

603603
=item Tests
604604

README.win32

+17-43
Original file line numberDiff line numberDiff line change
@@ -97,20 +97,9 @@ See L</Usage Hints for Perl on Windows> below for general hints about this.
9797

9898
You need a "make" program to build the sources. If you are using
9999
Visual C++ or the Windows SDK tools, you can use nmake supplied with Visual C++
100-
or Windows SDK. You may also use, for Visual C++ or Windows SDK, dmake or gmake
101-
instead of nmake. dmake is open source software, but is not included with
102-
Visual C++ or Windows SDK. Builds using gcc need dmake or gmake. nmake is not
103-
supported for gcc builds. Parallel building is only supported with dmake and
104-
gmake, not nmake. When using dmake it is recommended to use dmake 4.13 or newer
105-
for parallel building. Older dmakes, in parallel mode, have very high CPU usage
106-
and pound the disk/filing system with duplicate I/O calls in an aggressive
107-
polling loop.
108-
109-
A port of dmake for Windows is available from:
110-
111-
L<https://metacpan.org/release/dmake>
112-
113-
Fetch and install dmake somewhere on your path.
100+
or Windows SDK. You may also use gmake instead of nmake. Builds using gcc need
101+
gmake. nmake is not supported for gcc builds. Parallel building is only
102+
supported with gmake, not nmake.
114103

115104
=item Command Shell
116105

@@ -321,7 +310,8 @@ MinGW64 (version 4.4.3 or later). It can be downloaded here:
321310
L<http://www.mingw.org/>
322311
L<http://www.mingw-w64.org/>
323312

324-
You also need dmake or gmake. See L</"Make"> above on how to get it.
313+
You also need gmake. Usually it comes with MinGW but its executable may have
314+
a different name, such as mingw32-make.exe.
325315

326316
Note that the MinGW build currently fails with version 6.3.0 or later.
327317

@@ -354,15 +344,14 @@ unlike GCC.
354344
Make sure you are in the "win32" subdirectory under the perl toplevel.
355345
This directory contains a "Makefile" that will work with
356346
versions of nmake that come with Visual C++ or the Windows SDK, and
357-
a GNU make "GNUmakefile" or dmake "makefile.mk" that will work for all
358-
supported compilers. The defaults in the gmake and dmake makefile are
359-
setup to build using MinGW/gcc.
347+
a GNU make "GNUmakefile" that will work for all supported compilers.
348+
The defaults in the gmake makefile are setup to build using MinGW/gcc.
360349

361350
=item *
362351

363-
Edit the GNUmakefile, makefile.mk (or Makefile, if you're using nmake)
364-
and change the values of INST_DRV and INST_TOP. You can also enable
365-
various build flags. These are explained in the makefiles.
352+
Edit the GNUmakefile (or Makefile, if you're using nmake) and change the values
353+
of INST_DRV and INST_TOP. You can also enable various build flags. These are
354+
explained in the makefiles.
366355

367356
Note that it is generally not a good idea to try to build a perl with
368357
INST_DRV and INST_TOP set to a path that already exists from a previous
@@ -378,7 +367,7 @@ F<lib> directories.
378367

379368
If building with the cross-compiler provided by
380369
mingw-w64.org you'll need to uncomment the line that sets
381-
GCCCROSS in the makefile.mk. Do this only if it's the cross-compiler - ie
370+
GCCCROSS in the GNUmakefile. Do this only if it's the cross-compiler - ie
382371
only if the bin folder doesn't contain a gcc.exe. (The cross-compiler
383372
does not provide a gcc.exe, g++.exe, ar.exe, etc. Instead, all of these
384373
executables are prefixed with 'x86_64-w64-mingw32-'.)
@@ -394,21 +383,18 @@ Be sure to read the instructions near the top of the makefiles carefully.
394383

395384
=item *
396385

397-
Type "dmake" ("gmake" for GNU make, or "nmake" if you are using that make).
386+
Type "gmake" (or "nmake" if you are using that make).
398387

399388
This should build everything. Specifically, it will create perl.exe,
400389
perl533.dll at the perl toplevel, and various other extension dll's
401390
under the lib\auto directory. If the build fails for any reason, make
402391
sure you have done the previous steps correctly.
403392

404-
To try dmake's parallel mode, type "dmake -P2", where 2, is the maximum number
393+
To try gmake's parallel mode, type "gmake -j2", where 2, is the maximum number
405394
of parallel jobs you want to run. A number of things in the build process will
406395
run in parallel, but there are serialization points where you will see just 1
407396
CPU maxed out. This is normal.
408397

409-
Similarly you can build in parallel with GNU make, type "gmake -j2" to
410-
build with two parallel jobs, or higher for more.
411-
412398
If you are advanced enough with building C code, here is a suggestion to speed
413399
up building perl, and the later C<make test>. Try to keep your PATH environmental
414400
variable with the least number of folders possible (remember to keep your C
@@ -420,7 +406,7 @@ is the most commonly launched program during the build and later testing.
420406

421407
=head2 Testing Perl on Windows
422408

423-
Type "dmake test" (or "gmake test", "nmake test"). This will run most
409+
Type "gmake test" (or "nmake test"). This will run most
424410
of the tests from the testsuite (many tests will be skipped).
425411

426412
There should be no test failures.
@@ -448,7 +434,7 @@ native "cmd.exe", or if you are building from a path that contains
448434
spaces. So don't do that.
449435

450436
If you are running the tests from a emacs shell window, you may see
451-
failures in op/stat.t. Run "dmake test-notty" in that case.
437+
failures in op/stat.t. Run "gmake test-notty" in that case.
452438

453439
Furthermore, you should make sure that during C<make test> you do not
454440
have any GNU tool packages in your path: some toolkits like Unixutils
@@ -467,7 +453,7 @@ Please report any other failures as described under L</BUGS AND CAVEATS>.
467453

468454
=head2 Installation of Perl on Windows
469455

470-
Type "dmake install" (or "gmake install", "nmake install"). This will
456+
Type "gmake install" ("nmake install"). This will
471457
put the newly built perl and the libraries under whatever C<INST_TOP>
472458
points to in the Makefile. It will also install the pod documentation
473459
under C<$INST_TOP\$INST_VER\lib\pod> and HTML versions of the same
@@ -650,25 +636,13 @@ may not provide a testsuite (so "$MAKE test" may not do anything or
650636
fail), but most serious ones do.
651637

652638
It is important that you use a supported 'make' program, and
653-
ensure Config.pm knows about it. If you don't have nmake, you can
654-
either get dmake from the location mentioned earlier or get an
655-
old version of nmake reportedly available from:
656-
657-
L<http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/nmake15.exe>
658-
659-
Another option is to use the make written in Perl, available from
660-
CPAN.
661-
662-
L<https://www.cpan.org/modules/by-module/Make/>
663-
664-
You may also use dmake or gmake. See L</"Make"> above on how to get it.
639+
ensure Config.pm knows about it.
665640

666641
Note that MakeMaker actually emits makefiles with different syntax
667642
depending on what 'make' it thinks you are using. Therefore, it is
668643
important that one of the following values appears in Config.pm:
669644

670645
make='nmake' # MakeMaker emits nmake syntax
671-
make='dmake' # MakeMaker emits dmake syntax
672646
any other value # MakeMaker emits generic make syntax
673647
(e.g GNU make, or Perl make)
674648

make_ext.pl

-4
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@
3636
#
3737
# make_ext.pl "MAKE=nmake -nologo" --dir=..\ext --target=clean
3838
#
39-
# make_ext.pl MAKE=dmake --dir=..\ext
40-
#
41-
# make_ext.pl MAKE=dmake --dir=..\ext --target=clean
42-
#
4339
# Will skip building extensions which are marked with an '!' char.
4440
# Mostly because they still not ported to specified platform.
4541
#

pod/perldelta.pod

+4
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,10 @@ versions < 3.22 now works again. This was broken in Perl 5.31.4.
338338
Building with mingw.org compilers (version 3.4.5 or later) using mingw runtime
339339
versions >= 3.21 now works (for compilers up to version 5.3.0).
340340

341+
Makefile.mk, and thus support for dmake, has been removed. It is still possible
342+
to build Perl on Windows using nmake (Makefile) and GNU make (GNUmakefile).
343+
[L<GH #18511|https://github.com/Perl/perl5/pull/18511>]
344+
341345
=back
342346

343347
=head1 Internal Changes

pod/perlmodinstall.pod

+1-4
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,7 @@ If you used WinZip, this was already done for you.
139139

140140
C. BUILD
141141

142-
You'll need the C<nmake> utility, available at
143-
L<http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/nmake15.exe>
144-
or dmake, available on CPAN.
145-
L<https://metacpan.org/release/dmake>
142+
You'll need either C<nmake> or C<gmake>.
146143

147144
Does the module require compilation (i.e. does it have files that end
148145
in .xs, .c, .h, .y, .cc, .cxx, or .C)? If it does, life is now

regen/lib_cleanup.pl

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ sub edit_win32_makefile {
154154
}
155155

156156
process('Makefile.SH', 'Makefile.SH', \&edit_makefile_SH, $TAP && '', $Verbose);
157-
foreach ('win32/Makefile', 'win32/makefile.mk', 'win32/GNUmakefile') {
157+
foreach ('win32/Makefile', 'win32/GNUmakefile') {
158158
process($_, $_, \&edit_win32_makefile, $TAP && '', $Verbose);
159159
}
160160

t/porting/pod_rules.t

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#
77
# Why do we test this?
88
# Among other reasons, to check the well-formed-ness of these files:
9-
# win32/makefile.mk
109
# MANIFEST
1110
# win32/Makefile
1211
# win32/pod.mak

t/porting/regen.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if ( $Config{usecrosscompile} ) {
2626
skip_all( "Not all files are available during cross-compilation" );
2727
}
2828

29-
my $tests = 25; # I can't see a clean way to calculate this automatically.
29+
my $tests = 24; # I can't see a clean way to calculate this automatically.
3030

3131
my %skip = ("regen_perly.pl" => [qw(perly.act perly.h perly.tab)],
3232
"regen/keywords.pl" => [qw(keywords.c keywords.h)],

win32/config.gc

+1-1
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ lseektype='long long'
894894
mad='undef'
895895
mail=''
896896
mailx=''
897-
make='dmake'
897+
make='gmake'
898898
make_set_make='#'
899899
mallocobj='malloc.o'
900900
mallocsrc='malloc.c'

0 commit comments

Comments
 (0)