* texinfo.tex (\value): handle active _ or - in argument (happens
[make.git] / README.W32
blobca7f32c69cd99d3bccf631b4736302a2c3c87117
1 Port of GNU make to Windows NT and Windows 95
2 Builds natively with MSVC 2.x or MSVC 4.x compilers.
4 To build with nmake on Windows NT or Windows 95:
6         1. Make sure cl.exe is in your %Path%. Example:
8                 set Path=%Path%;c:/msdev/bin
10         2. Make sure %include% is set to msvc include directory. Example:
12                 set include=c:/msdev/include
14         3. Make sure %lib% is set to msvc lib directory. Example:
16                 set lib=c:/msdev/lib
18         4. nmake /f NMakefile
21 There is a bat file (build_w32.bat) for folks who have fear of nmake.
23 Outputs:
25         WinDebug/make.exe
26         WinRel/make.exe
29 -- Notes/Caveats --
31 GNU make and sh.exe:
33         This port prefers you have a working sh.exe somewhere on your
34         system. If you don't have sh.exe, port falls back to
35         MSDOS mode for launching programs (via a batch file).
36         The MSDOS mode style execution has not been tested too
37         carefully though (I use GNU bash as sh.exe).
39         There are very few true ports of Bourne shell for NT right now.
40         There is a version of GNU bash available from Cygnus gnu-win32
41         porting effort.  Other possibilities are to get the MKS version
42         of sh.exe or to build your own with a package like
43         NutCracker (DataFocus) or Portage (Consensys).
45         Tivoli uses a homegrown port of GNU bash which is not (yet)
46         freely available. It may be available someday, but I am not in control
47         of this decision nor do I influence it. Sorry!
49 GNU make and Cygnus GNU WIN32 tools (BATCH_MODE_ONLY_SHELL)
51         GNU make now has support for the Cygnus GNU WIN32 toolset. The
52         GNU WIN32 version of Bourne shell does not behave well when
53         invoked as 'sh -c' from CreateProcess().  The main problem is it
54         seems to have a hard time handling quoted strings correctly. This
55         problem goes away when invoking the Cygnus shell on a shell script.
57         To work around this difficulty, this version of make supports
58         a new batch mode.  When BATCH_MODE_ONLY_SHELL is defined at compile
59         time, make forces all command lines to be executed via script
60         files instead of by command line.
62         A native WIN32 system with no Bourne shell will also run
63         in batch mode.  All command lines will be put into batch files
64         and executed via $(COMSPEC) (%COMSPEC%).
66         If you wish to use Cygnus' GNUWIN32 shell, be sure you define
67         BATCH_MODE_ONLY_SHELL in the config.h.W32 prior to building make.
68         The new feataure was tested with the b18 version of the Cygnus
69         user tools.
71 GNU make and MKS shell
73         There is now semi-official support for the MKS shell. To turn this
74         support on, define HAVE_MKS_SHELL in the config.h.W32 before you
75         build make.  Do not define BATCH_MODE_ONLY_SHELL if you turn
76         on HAVE_MKS_SHELL.
78 GNU make handling of drive letters in pathnames (PATH, vpath, VPATH):
80         There is a caveat that should be noted with respect to handling
81         single character pathnames on Windows systems.  When colon is
82         used in PATH variables, make tries to be smart about knowing when
83         you are using colon as a separator versus colon as a drive
84         letter.  Unfortunately, something as simple as the string 'x:/'
85         could be interpreted 2 ways: (x and /) or (x:/).
87         Make chooses to interpret a letter plus colon (e.g. x:/) as a
88         drive letter pathname.  If it is necessary to use single
89         character directories in paths (VPATH, vpath, Path, PATH), the
90         user must do one of two things:
92          a. Use semicolon as the separator to disambiguate colon. For
93             example use 'x;/' if you want to say 'x' and '/' are
94             separate components.
96          b. Qualify the directory name so that there is more than
97             one character in the path(s) used. For example, none
98             of these settings are ambiguous:
100               ./x:./y
101               /some/path/x:/some/path/y
102               x:/some/path/x:x:/some/path/y
104         These caveats affect Windows systems only (Windows NT and
105         Windows 95) and can be ignored for other platforms.
107         Please note that you are free to mix colon and semi-colon in the
108         specification of paths.  Make is able to figure out the intended
109         result and convert the paths internally to the format needed
110         when interacting with the operating system.
112         You are encouraged to use colon as the separator character.
113         This should ease the pain of deciding how to handle various path
114         problems which exist between platforms.  If colon is used on
115         both Unix and Windows systems, then no ifdef'ing will be
116         necessary in the makefile source.
118 GNU make test suite:
120         I verified all functionality with a slightly modified version
121         of make-test-0.4.5 (modifications to get test suite to run
122         on Windows NT). All tests pass in an environment that includes
123         sh.exe. Tested on both Windows NT and Windows 95.
125 Building GNU make on Windows NT and Windows 95 with Microsoft Visual C
127         I did not provide a Visual C project file with this port as
128         the project file would not be considered freely distributable
129         (or so I think). It is easy enough to create one though if
130         you know how to use Visual C.
132         I build the program statically to avoid problems locating DLL's
133         on machines that may not have MSVC runtime installed. If you
134         prefer, you can change make to build with shared libraries by
135         changing /MT to /MD in the NMakefile (or build_w32.bat).
137         Program has not been built under non-Intel architectures (yet).
139         I have not tried to build with any other compilers than MSVC.
141 Pathnames and white space:
143         Unlike Unix, Windows 95/NT systems encourage pathnames which
144         contain white space (e.g. C:\Program Files\). These sorts of pathnames
145         are legal under Unix too, but are never encouraged. There is
146         at least one place in make (VPATH/vpath handling) where paths
147         containing white space will simply not work. There may be others
148         too. I chose to not try and port make in such a way so that
149         these sorts of paths could be handled. I offer these suggestions
150         as workarounds:
152                 1. Use 8.3 notation
153                 2. Rename the directory so it does not contain white space.
155         If you are unhappy with this choice, this is free software
156         and you are free to take a crack at making this work. The code
157         in w32/pathstuff.c and vpath.c would be the places to start.
159 Pathnames and Case insensitivity:
161         Unlike Unix, Windows 95/NT systems are case insensitive but case
162         preserving.  For example if you tell the file system to create a
163         file named "Target", it will preserve the case.  Subsequent access to
164         the file with other case permutations will succeed (i.e. opening a
165         file named "target" or "TARGET" will open the file "Target").
167         By default, GNU make retains its case sensitivity when comparing
168         target names and existing files or directories.  It can be
169         configured, however, into a case preserving and case insensitive
170         mode by adding a define for HAVE_CASE_INSENSITIVE_FS to
171         config.h.W32.
173         For example, the following makefile will create a file named
174         Target in the directory subdir which will subsequently be used
175         to satisfy the dependency of SUBDIR/DepTarget on SubDir/TARGET.
176         Without HAVE_CASE_INSENSITIVE_FS configured, the dependency link
177         will not be made:
179         subdir/Target:
180                 touch $@
182         SUBDIR/DepTarget: SubDir/TARGET
183                 cp $^ $@
185         Reliance on this behavior also eliminates the ability of GNU make
186         to use case in comparison of matching rules.  For example, it is
187         not possible to set up a C++ rule using %.C that is different
188         than a C rule using %.c.  GNU make will consider these to be the
189         same rule and will issue a warning.
191 SAMBA/NTFS/VFAT:
193         I have not had any success building the debug version of this
194         package using SAMBA as my file server. The reason seems to be
195         related to the way VC++ 4.0 changes the case name of the pdb
196         filename it is passed on the command line. It seems to change
197         the name always to to lower case. I contend that
198         the VC++ compiler should not change the casename of files that
199         are passed as arguments on the command line. I don't think this
200         was a problem in MSVC 2.x, but I know it is a problem in MSVC 4.x.
202         The package builds fine on VFAT and NTFS filesystems.
204         Most all of the development I have done to date has been using
205         NTFS and long file names. I have not done any considerable work
206         under VFAT. VFAT users may wish to be aware that this port
207         of make does respect case sensitivity.
209         Version 3.76 contains some preliminary support for FAT.  Make
210         now tries to work around some difficulties with stat'ing of
211         files and caching of filenames and directories internally.
212         There is still a known problem with filenames sometimes being
213         found to have modification dates in the future which cause make
214         to complain about the file and exit (remake.c).
216 Bug reports:
218         Please submit bugs via the normal bug reporting mechanism
219         which is described in one of the Texinfo files. If you don't
220         have Texinfo for Windows NT or Windows 95, these files are simple
221         text files and can be read with a text editor.