Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: makefile.mk is missing with Perl 5.34.0 distro.

by syphilis (Archbishop)
on Aug 25, 2021 at 00:46 UTC ( [id://11136069]=note: print w/replies, xml ) Need Help??


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

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

Replies are listed 'Best First'.
Re^3: makefile.mk is missing with Perl 5.34.0 distro.
by Anonymous Monk on Aug 25, 2021 at 04:52 UTC
    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
        Thank you for the reply,

        I have changed the makefile.patch file accordingly and changed the line numbers as per GNUmakefile, but not all 3 hunks are successful at a time.
        Is there any specific format I need to follow to get all 3 hunks successful?

        How can I get a new makefie.patch file for GNUmakefile?
        Thank you.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11136069]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 01:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found