Ignore:
Timestamp:
Mar 14, 2018, 10:28:10 PM (8 years ago)
Author:
bird
Message:

kmk: Merged in changes from GNU make 4.2.1 (2e55f5e4abdc0e38c1d64be703b446695e70b3b6 / https://git.savannah.gnu.org/git/make.git).

Location:
trunk/src/kmk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk

  • trunk/src/kmk/README.W32.template

    r2591 r3140  
    1 This version of GNU make has been tested on Microsoft Windows 2000/XP/2003.
     1This version of GNU make has been tested on:
     2  Microsoft Windows 2000/XP/2003/Vista/7/8/10
    23It has also been used on Windows 95/98/NT, and on OS/2.
    34
    4 It builds with the MinGW port of GCC (tested with GCC 3.4.2).
    5 
    6 It also builds with MSVC 2.x, 4.x, 5.x, 6.x, and 2003 as well as
    7 with .NET 7.x and .NET 2003.
    8 
    9 The Windows 32-bit port of GNU make is maintained jointly by various
    10 people.  It was originally made by Rob Tulloh.
     5It builds with the MinGW port of GCC (tested with GCC 3.4.2, 4.8.1,
     6and 4.9.3).
     7
     8It also builds with MSVC 2.x, 4.x, 5.x, 6.x, 2003, and 14 (2015) as
     9well as with .NET 7.x and .NET 2003.
     10
     11As of version 4.0, a build with Guile is supported (tested with Guile
     122.0.3).  To build with Guile, you will need, in addition to Guile
     13itself, its dependency libraries and the pkg-config program.  The
     14latter is used to figure out which compilation and link switches and
     15libraries need to be mentioned on the compiler command lines to
     16correctly link with Guile.  A Windows port of pkg-config can be found
     17on ezwinports site:
     18
     19  http://sourceforge.net/projects/ezwinports/
     20
     21The libraries on which Guile depends can vary depending on your
     22version and build of Guile.  At the very least, the Boehm's GC library
     23will be needed, and typically also GNU MP, libffi, libunistring, and
     24libtool's libltdl.  Whoever built the port of Guile you have should
     25also provide you with these dependencies or a URL where to download
     26them.  A precompiled 32-bit Windows build of Guile is available from
     27the ezwinports site mentioned above.
     28
     29The Windows port of GNU make is maintained jointly by various people.
     30It was originally made by Rob Tulloh.
     31It is currently maintained by Eli Zaretskii.
    1132
    1233
     
    1435---------------------------------------------------------
    1536
    16  1. At the Windows command prompt run:
    17 
    18       if not exist NMakefile copy NMakefile.template NMakefile
    19       if not exist config.h copy config.h.W32 config.h
    20 
    21     Then edit config.h to your liking (especially the few shell-related
     37 1. Edit config.h.W32 to your liking (especially the few shell-related
    2238    defines near the end, or HAVE_CASE_INSENSITIVE_FS which corresponds
    23     to './configure --enable-case-insensitive-file-system').
     39    to './configure --enable-case-insensitive-file-system').  (We don't
     40    recommend to define HAVE_CASE_INSENSITIVE_FS, but you may wish to
     41    consider that if you have a lot of files whose names are in upper
     42    case, while Makefile rules are written for lower-case versions.)
    2443
    2544
     
    3857    correct PATH and other environment variables for it, then execute ...
    3958
    40         build_w32.bat gcc
    41 
    42     This produces gnumake.exe in the current directory.
     59        build_w32.bat gcc
     60
     61    This produces gnumake.exe in the GccRel directory.
     62    If you want a version of GNU make built with debugging enabled,
     63    add the --debug option.
     64
     65    The batch file will probe for Guile installation, and will build
     66    gnumake.exe with Guile if it finds it.  If you have Guile
     67    installed, but want to build Make without Guile support, type
     68
     69        build_w32.bat --without-guile gcc
    4370
    4471
     
    5279    menue entry from the cl-installation), then execute EITHER ...
    5380
    54         build_w32.bat
    55 
    56     (this produces WinDebug/gnumake.exe and WinRel/gnumake.exe)
     81        build_w32.bat
     82
     83    This produces gnumake.exe in the WinRel directory.
     84    If you want a version of GNU make built with debugging enabled,
     85    add the --debug option.
    5786
    5887    ... OR ...
    5988
    60         nmake /f NMakefile
     89        nmake /f NMakefile
    6190
    6291    (this produces WinDebug/make.exe and WinRel/make.exe).
    6392
     93    The batch file will probe for Guile installation, and will build
     94    gnumake.exe with Guile if it finds it.  If you have Guile
     95    installed, but want to build Make without Guile support, type
     96
     97        build_w32.bat --without-guile
    6498
    6599-------------------
     
    69103GNU make on Windows 32-bit platforms:
    70104
    71         This version of make is ported natively to Windows32 platforms
    72         (Windows NT 3.51, Windows NT 4.0, Windows 2000, Windows XP,
    73         Windows 95, and Windows 98). It does not rely on any 3rd party
    74         software or add-on packages for building. The only thing
    75         needed is a Windows compiler.  Two compilers supported
    76         officially are the MinGW port of GNU GCC, and the various
    77         versions of the Microsoft C compiler.
    78 
    79         Do not confuse this port of GNU make with other Windows32 projects
    80         which provide a GNU make binary. These are separate projects
    81         and are not connected to this port effort.
     105        This version of make is ported natively to Windows32 platforms
     106        (Windows NT 3.51, Windows NT 4.0, Windows 2000, Windows XP,
     107        Windows 95, and Windows 98). It does not rely on any 3rd party
     108        software or add-on packages for building. The only thing
     109        needed is a Windows compiler.  Two compilers supported
     110        officially are the MinGW port of GNU GCC, and the various
     111        versions of the Microsoft C compiler.
     112
     113        Do not confuse this port of GNU make with other Windows32 projects
     114        which provide a GNU make binary. These are separate projects
     115        and are not connected to this port effort.
    82116
    83117GNU make and sh.exe:
    84118
    85         This port prefers if you have a working sh.exe somewhere on
    86         your system. If you don't have sh.exe, the port falls back to
    87         MSDOS mode for launching programs (via a batch file).  The
    88         MSDOS mode style execution has not been tested that carefully
    89         though (The author uses GNU bash as sh.exe).
    90 
    91         There are very few true ports of Bourne shell for NT right now.
    92         There is a version of GNU bash available from Cygnus "Cygwin"
    93         porting effort (http://www.cygwin.com/).
    94         Other possibilities are the MKS version of sh.exe, or building
     119        This port prefers if you have a working sh.exe somewhere on
     120        your system. If you don't have sh.exe, the port falls back to
     121        MSDOS mode for launching programs (via a batch file).  The
     122        MSDOS mode style execution has not been tested that carefully
     123        though (The author uses GNU bash as sh.exe).
     124
     125        There are very few true ports of Bourne shell for NT right now.
     126        There is a version of GNU bash available from Cygnus "Cygwin"
     127        porting effort (http://www.cygwin.com/).
     128        Other possibilities are the MKS version of sh.exe, or building
    95129        your own with a package like NutCracker (DataFocus) or Portage
    96130        (Consensys).  Also MinGW includes sh (http://mingw.org/).
     
    98132GNU make and brain-dead shells (BATCH_MODE_ONLY_SHELL):
    99133
    100         Some versions of Bourne shell do not behave well when invoked
    101         as 'sh -c' from CreateProcess().  The main problem is they seem
    102         to have a hard time handling quoted strings correctly. This can
    103         be circumvented by writing commands to be executed to a batch
    104         file and then executing the command by calling 'sh file'.
    105 
    106         To work around this difficulty, this version of make supports
    107         a batch mode.  When BATCH_MODE_ONLY_SHELL is defined at compile
    108         time, make forces all command lines to be executed via script
    109         files instead of by command line.  In this mode you must have a
    110         working sh.exe in order to use parallel builds (-j).
    111 
    112         A native Windows32 system with no Bourne shell will also run
    113         in batch mode.  All command lines will be put into batch files
    114         and executed via $(COMSPEC) (%COMSPEC%).  However, parallel
    115         builds ARE supported with Windows shells (cmd.exe and
    116         command.com).  See the next section about some peculiarities
    117         of parallel builds on Windows.
     134        Some versions of Bourne shell do not behave well when invoked
     135        as 'sh -c' from CreateProcess().  The main problem is they seem
     136        to have a hard time handling quoted strings correctly. This can
     137        be circumvented by writing commands to be executed to a batch
     138        file and then executing the command by calling 'sh file'.
     139
     140        To work around this difficulty, this version of make supports
     141        a batch mode.  When BATCH_MODE_ONLY_SHELL is defined at compile
     142        time, make forces all command lines to be executed via script
     143        files instead of by command line.  In this mode you must have a
     144        working sh.exe in order to use parallel builds (-j).
     145
     146        A native Windows32 system with no Bourne shell will also run
     147        in batch mode.  All command lines will be put into batch files
     148        and executed via $(COMSPEC) (%COMSPEC%).  However, parallel
     149        builds ARE supported with Windows shells (cmd.exe and
     150        command.com).  See the next section about some peculiarities
     151        of parallel builds on Windows.
    118152
    119153Support for parallel builds
    120154
    121         Parallel builds (-jN) are supported in this port, with 2
    122         limitations:
    123 
    124           - The number of concurrent processes has a hard limit of 64,
    125             due to the way this port implements waiting for its
    126             subprocesses;
    127 
    128           - The job server method (available when Make runs on Posix
    129             platforms) is not supported, which means you must pass an
    130             explicit -jN switch to sub-Make's in a recursive Makefile.
    131             If a sub-Make does not receive an explicit -jN switch, it
    132             will default to -j1, i.e. no parallelism in sub-Make's.
     155        Parallel builds (-jN) are supported in this port, with 1
     156        limitation: The number of concurrent processes has a hard
     157        limit of 64, due to the way this port implements waiting for
     158        its subprocesses.
    133159
    134160GNU make and Cygnus GNU Windows32 tools:
    135161
    136         Good news! Make now has native support for Cygwin sh. To enable,
    137         define the HAVE_CYGWIN_SHELL in config.h and rebuild make
    138         from scratch. This version of make tested with B20.1 of Cygwin.
    139         Do not define BATCH_MODE_ONLY_SHELL if you use HAVE_CYGWIN_SHELL.
     162        Good news! Make now has native support for Cygwin sh. To enable,
     163        define the HAVE_CYGWIN_SHELL in config.h and rebuild make
     164        from scratch. This version of make tested with B20.1 of Cygwin.
     165        Do not define BATCH_MODE_ONLY_SHELL if you use HAVE_CYGWIN_SHELL.
    140166
    141167GNU make and the MKS shell:
    142168
    143         There is now semi-official support for the MKS shell. To turn this
    144         support on, define HAVE_MKS_SHELL in the config.h.W32 before you
    145         build make.  Do not define BATCH_MODE_ONLY_SHELL if you turn
    146         on HAVE_MKS_SHELL.
     169        There is now semi-official support for the MKS shell. To turn this
     170        support on, define HAVE_MKS_SHELL in the config.h.W32 before you
     171        build make.  Do not define BATCH_MODE_ONLY_SHELL if you turn
     172        on HAVE_MKS_SHELL.
    147173
    148174GNU make handling of drive letters in pathnames (PATH, vpath, VPATH):
    149175
    150         There is a caveat that should be noted with respect to handling
    151         single character pathnames on Windows systems.  When colon is
    152         used in PATH variables, make tries to be smart about knowing when
    153         you are using colon as a separator versus colon as a drive
    154         letter. Unfortunately, something as simple as the string 'x:/'
    155         could be interpreted 2 ways: (x and /) or (x:/).
    156 
    157         Make chooses to interpret a letter plus colon (e.g. x:/) as a
    158         drive letter pathname.  If it is necessary to use single
    159         character directories in paths (VPATH, vpath, Path, PATH), the
    160         user must do one of two things:
    161 
    162         a. Use semicolon as the separator to disambiguate colon. For
    163             example use 'x;/' if you want to say 'x' and '/' are
    164             separate components.
    165 
    166         b. Qualify the directory name so that there is more than
    167             one character in the path(s) used. For example, none
    168             of these settings are ambiguous:
    169 
    170               ./x:./y
    171               /some/path/x:/some/path/y
    172               x:/some/path/x:x:/some/path/y
    173 
    174         Please note that you are free to mix colon and semi-colon in the
    175         specification of paths. Make is able to figure out the intended
    176         result and convert the paths internally to the format needed
    177         when interacting with the operating system, providing the path
    178         is not within quotes, e.g. "x:/test/test.c".
    179 
    180         You are encouraged to use colon as the separator character.
    181         This should ease the pain of deciding how to handle various path
    182         problems which exist between platforms. If colon is used on
    183         both Unix and Windows systems, then no ifdef'ing will be
    184         necessary in the makefile source.
     176        There is a caveat that should be noted with respect to handling
     177        single character pathnames on Windows systems.  When colon is
     178        used in PATH variables, make tries to be smart about knowing when
     179        you are using colon as a separator versus colon as a drive
     180        letter. Unfortunately, something as simple as the string 'x:/'
     181        could be interpreted 2 ways: (x and /) or (x:/).
     182
     183        Make chooses to interpret a letter plus colon (e.g. x:/) as a
     184        drive letter pathname.  If it is necessary to use single
     185        character directories in paths (VPATH, vpath, Path, PATH), the
     186        user must do one of two things:
     187
     188        a. Use semicolon as the separator to disambiguate colon. For
     189            example use 'x;/' if you want to say 'x' and '/' are
     190            separate components.
     191
     192        b. Qualify the directory name so that there is more than
     193            one character in the path(s) used. For example, none
     194            of these settings are ambiguous:
     195
     196              ./x:./y
     197              /some/path/x:/some/path/y
     198              x:/some/path/x:x:/some/path/y
     199
     200        Please note that you are free to mix colon and semi-colon in the
     201        specification of paths. Make is able to figure out the intended
     202        result and convert the paths internally to the format needed
     203        when interacting with the operating system, providing the path
     204        is not within quotes, e.g. "x:/test/test.c".
     205
     206        You are encouraged to use colon as the separator character.
     207        This should ease the pain of deciding how to handle various path
     208        problems which exist between platforms. If colon is used on
     209        both Unix and Windows systems, then no ifdef'ing will be
     210        necessary in the makefile source.
    185211
    186212GNU make test suite:
    187213
    188         I verified all functionality with a slightly modified version
    189         of make-test-%VERSION% (modifications to get test suite to run
    190         on Windows NT). All tests pass in an environment that includes
    191         sh.exe.  Tests were performed on both Windows NT and Windows 95.
     214        I verified all functionality with a slightly modified version
     215        of make-test-%VERSION% (modifications to get test suite to run
     216        on Windows NT). All tests pass in an environment that includes
     217        sh.exe.  Tests were performed on both Windows NT and Windows 95.
    192218
    193219Pathnames and white space:
    194220
    195         Unlike Unix, Windows 95/NT systems encourage pathnames which
    196         contain white space (e.g. C:\Program Files\). These sorts of
    197         pathnames are valid on Unix too, but are never encouraged.
    198         There is at least one place in make (VPATH/vpath handling) where
    199         paths containing white space will simply not work. There may be
    200         others too. I chose to not try and port make in such a way so
    201         that these sorts of paths could be handled. I offer these
    202         suggestions as workarounds:
    203 
    204                 1. Use 8.3 notation. i.e. "x:/long~1/", which is actually
    205                    "x:\longpathtest".  Type "dir /x" to view these filenames
    206                    within the cmd.exe shell.
    207                 2. Rename the directory so it does not contain white space.
    208 
    209         If you are unhappy with this choice, this is free software
    210         and you are free to take a crack at making this work. The code
    211         in w32/pathstuff.c and vpath.c would be the places to start.
     221        Unlike Unix, Windows 95/NT systems encourage pathnames which
     222        contain white space (e.g. C:\Program Files\). These sorts of
     223        pathnames are valid on Unix too, but are never encouraged.
     224        There is at least one place in make (VPATH/vpath handling) where
     225        paths containing white space will simply not work. There may be
     226        others too. I chose to not try and port make in such a way so
     227        that these sorts of paths could be handled. I offer these
     228        suggestions as workarounds:
     229
     230                1. Use 8.3 notation. i.e. "x:/long~1/", which is actually
     231                   "x:\longpathtest".  Type "dir /x" to view these filenames
     232                   within the cmd.exe shell.
     233                2. Rename the directory so it does not contain white space.
     234
     235        If you are unhappy with this choice, this is free software
     236        and you are free to take a crack at making this work. The code
     237        in w32/pathstuff.c and vpath.c would be the places to start.
    212238
    213239Pathnames and Case insensitivity:
    214240
    215         Unlike Unix, Windows 95/NT systems are case insensitive but case
    216         preserving.  For example if you tell the file system to create a
    217         file named "Target", it will preserve the case.  Subsequent access to
    218         the file with other case permutations will succeed (i.e. opening a
    219         file named "target" or "TARGET" will open the file "Target").
    220 
    221         By default, GNU make retains its case sensitivity when comparing
    222         target names and existing files or directories.  It can be
    223         configured, however, into a case preserving and case insensitive
    224         mode by adding a define for HAVE_CASE_INSENSITIVE_FS to
    225         config.h.W32.
    226 
    227         For example, the following makefile will create a file named
    228         Target in the directory subdir which will subsequently be used
    229         to satisfy the dependency of SUBDIR/DepTarget on SubDir/TARGET.
    230         Without HAVE_CASE_INSENSITIVE_FS configured, the dependency link
    231         will not be made:
    232 
    233         subdir/Target:
    234                 touch $@
    235 
    236         SUBDIR/DepTarget: SubDir/TARGET
    237                 cp $^ $@
    238 
    239         Reliance on this behavior also eliminates the ability of GNU make
    240         to use case in comparison of matching rules.  For example, it is
    241         not possible to set up a C++ rule using %.C that is different
    242         than a C rule using %.c.  GNU make will consider these to be the
    243         same rule and will issue a warning.
     241        Unlike Unix, Windows 95/NT systems are case insensitive but case
     242        preserving.  For example if you tell the file system to create a
     243        file named "Target", it will preserve the case.  Subsequent access to
     244        the file with other case permutations will succeed (i.e. opening a
     245        file named "target" or "TARGET" will open the file "Target").
     246
     247        By default, GNU make retains its case sensitivity when comparing
     248        target names and existing files or directories.  It can be
     249        configured, however, into a case preserving and case insensitive
     250        mode by adding a define for HAVE_CASE_INSENSITIVE_FS to
     251        config.h.W32.
     252
     253        For example, the following makefile will create a file named
     254        Target in the directory subdir which will subsequently be used
     255        to satisfy the dependency of SUBDIR/DepTarget on SubDir/TARGET.
     256        Without HAVE_CASE_INSENSITIVE_FS configured, the dependency link
     257        will not be made:
     258
     259        subdir/Target:
     260                touch $@
     261
     262        SUBDIR/DepTarget: SubDir/TARGET
     263                cp $^ $@
     264
     265        Reliance on this behavior also eliminates the ability of GNU make
     266        to use case in comparison of matching rules.  For example, it is
     267        not possible to set up a C++ rule using %.C that is different
     268        than a C rule using %.c.  GNU make will consider these to be the
     269        same rule and will issue a warning.
    244270
    245271SAMBA/NTFS/VFAT:
    246272
    247         I have not had any success building the debug version of this
    248         package using SAMBA as my file server. The reason seems to be
    249         related to the way VC++ 4.0 changes the case name of the pdb
    250         filename it is passed on the command line. It seems to change
    251         the name always to to lower case. I contend that the VC++
    252         compiler should not change the casename of files that are passed
    253         as arguments on the command line. I don't think this was a
    254         problem in MSVC 2.x, but I know it is a problem in MSVC 4.x.
    255 
    256         The package builds fine on VFAT and NTFS filesystems.
    257 
    258         Most all of the development I have done to date has been using
    259         NTFS and long file names. I have not done any considerable work
    260         under VFAT. VFAT users may wish to be aware that this port of
    261         make does respect case sensitivity.
     273        I have not had any success building the debug version of this
     274        package using SAMBA as my file server. The reason seems to be
     275        related to the way VC++ 4.0 changes the case name of the pdb
     276        filename it is passed on the command line. It seems to change
     277        the name always to to lower case. I contend that the VC++
     278        compiler should not change the casename of files that are passed
     279        as arguments on the command line. I don't think this was a
     280        problem in MSVC 2.x, but I know it is a problem in MSVC 4.x.
     281
     282        The package builds fine on VFAT and NTFS filesystems.
     283
     284        Most all of the development I have done to date has been using
     285        NTFS and long file names. I have not done any considerable work
     286        under VFAT. VFAT users may wish to be aware that this port of
     287        make does respect case sensitivity.
    262288
    263289FAT:
    264290
    265         Version 3.76 added support for FAT filesystems. Make works
    266         around some difficulties with stat'ing of files and caching of
    267         filenames and directories internally.
     291        Version 3.76 added support for FAT filesystems. Make works
     292        around some difficulties with stat'ing of files and caching of
     293        filenames and directories internally.
    268294
    269295Bug reports:
    270296
    271         Please submit bugs via the normal bug reporting mechanism which
    272         is described in the GNU make manual and the base README.
     297        Please submit bugs via the normal bug reporting mechanism which
     298        is described in the GNU make manual and the base README.
    273299
    274300
    275301-------------------------------------------------------------------------------
    276 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    277 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
     302Copyright (C) 1996-2016 Free Software Foundation, Inc.
    278303This file is part of GNU Make.
    279304
Note: See TracChangeset for help on using the changeset viewer.