in reply to makefile.mk is missing with Perl 5.34.0 distro.

Hi Monks,
Thank you for the reply.
i tried installing make(gmake) on windows and added it in the path in the batch file, like below,
SET PATH=C:\Program Files (x86)\GnuWin32\bin;C:\msys64\mingw64\bin;C:\ +msys64\usr\bin;%PATH%;C:\Program Files\7-Zip
I have changed the make filename to the GNUmakefile, but i am getting below error
Everything is Ok Folders: 952 Files: 6300 Size: 84783072 Compressed: 3722240 patching file 'C:\perlapp\sources\builds\win64\perl5.34.0\win32\GNUmak +efile' Hunk #1 FAILED at 27. Hunk #2 FAILED at 227. Hunk #3 FAILED at 292. 3 out of 3 hunks FAILED -- saving rejects to file 'C:\perlapp\sources\ +builds\win64\perl-5.34.0\win32\GNUmakefile.rej'
Any idea what could cause this error.
Do i need nmake here.

Replies are listed 'Best First'.
Re^2: makefile.mk is missing with Perl 5.34.0 distro.
by Corion (Patriarch) on Aug 24, 2021 at 17:38 UTC

    No. Whatever patches you're trying to apply don't apply. This is likely because the file does not match your patches.

    The solution is to look at your patches and understand them, and then change the GNUmakefile accordingly.

    This is not an automated process.

Re^2: makefile.mk is missing with Perl 5.34.0 distro.
by syphilis (Archbishop) on Aug 25, 2021 at 00:46 UTC
    Any idea what could cause this error.

    Sorry - I was assuming that your build (batch) script was passing command line arguments to make.
    In that case, the same command line args that worked for dmake (and makefile.mk) would also work for gmake (and GNUmakefile).
    But if you're using the batch file to edit the GNUmakefile then you'll need to rewrite your patches.

    I recommend that you stop altering the GNUmakefile, and instead start providing your build options via the arguments you provide to gmake.
    For example, if you want perl to be installed in C:\my_new_perl and mingw is installed in C:\my_mingw, then instead of altering the INST_TOP and CCHOME settings in GNUmakefile, just run:
    gmake INST_TOP=C:\my_new_perl CCHOME=C:\my_mingw gmake test INST_TOP=C:\my_new_perl CCHOME=C:\my_mingw gmake install INST_TOP=C:\my_new_perl CCHOME=C:\my_mingw
    Of course, there maybe other build options that you'll want to add to that argument list.

    Do I need nmake here.

    No - the GNUmakefile is written specifically for GNU make.
    The Makefile is written specifically for nmake, but it supports only Microsoft compilers.

    Cheers,
    Rob
      Hi Rob, Thank you for the revert.

      Below is the patch command where it seems failing while patching, I am not sure if "GNUmakefile" is getting updated or modified here.

      patch -b %PERL_BUILD_DIR%\win32\GNUmakefile %PERL_SOURCES_DIR%\configu +ration\win64\makefile.patch
      Below is the content of the makefile.patch
      --- C:/perl_app/sources/builds/perl-5.22.2_win64/perl-5.22.2/win32/mak +efile.mk.orig Fri Apr 08 17:45:19 2016 +++ C:/perl_app/sources/builds/perl-5.22.2_win64/perl-5.22.2/win32/mak +efile.mk Fri May 13 09:51:24 2016 @@ -27,7 +27,7 @@ # newly built perl. # INST_DRV *= c: -INST_TOP *= $(INST_DRV)\perl +INST_TOP *= $(INST_DRV)\perl_app\bin\Perl # # Uncomment if you want to build a 32-bit Perl using a 32-bit compile +r @@ -227,7 +227,7 @@ # not be quoted) # .IF "$(CCTYPE)" == "GCC" -CCHOME *= C:\MinGW +CCHOME *= C:\msys64\mingw64 .ELSE CCHOME *= $(MSVCDIR) .ENDIF @@ -292,7 +292,7 @@ # set this to your email address (perl will guess a value from # from your loginname and your hostname, which may not be right) # -#EMAIL *= +EMAIL *= customer_support@xyz.com ## ## Build configuration ends.
      Can you please tell me what's going on here, do I need to modify the makefile.patch file.
      Thank you.

        to start with, start with a freshly extracted distribution/source. Patch with a fresh, virgin GNUmakefile. Then you can edit GNUmakefile if you are sure you know what you are doing. A patch file contains line numbers, e.g. @@ -292,7 +292,7 @@. Editing the file to be patched beforehand, will confuse patch.

        bw, bliako

        Can you please tell me what's going on here ...

        The intention of the patch is to alter the settings of INST_TOP, CCHOME, and EMAIL.
        You could alter those settings in the GNUmakefile by hand if you like.
        However, a better solution IMO, is to leave the GNUmakefile in its original state and run:
        gmake INST_TOP=C:\perl_app\bin\Perl CCHOME=C:\msys64\mingw64 EMAIL=cus +tomer_support@xyz.com gmake test INST_TOP=C:\perl_app\bin\Perl CCHOME=C:\msys64\mingw64 EMAI +L=customer_support@xyz.com gmake install INST_TOP=C:\perl_app\bin\Perl CCHOME=C:\msys64\mingw64 E +MAIL=customer_support@xyz.com
        do I need to modify the makefile.patch file

        If you want to make your configurational changes by running patch then yes, you will need a different patch file.
        The current patch is not written for the GNUmakefile.
        For example, the line
        #EMAIL *=
        does not exist in GNUmakefile. Instead GNUmakefile contains:
        #EMAIL :=
        and that line needs to be changed to:
        EMAIL := customer_support@xyz.com
        not to:
        EMAIL *= customer_support@xyz.com
        Also, the numbers in the lines like @@ -27,7 +27,7 @@ etc. are all wrong for the GNUmakefile.

        Cheers,
        Rob