nasm/Mkfiles
H. Peter Anvin (Intel) 8317d7ae2f Mkfiles/msvc.mak: make the docs: target actually work under real nmake
The docs: target fed doc/Makefile.in directly to nmake, but that file
relies on several GNU make-only constructs nmake cannot parse at all:
the $^ automatic variable (not valid nmake macro syntax -- fatal
parse error), $< used outside of an inference rule (silently
unsupported, since nmake only defines $< within .SUFFIXES-style
rules), and the GNU-only "-include *.dep" optional wildcard include
directive (nmake only understands the unrelated "!include"
directive). Add tools/mkmsvcdocmak.pl, which rewrites just those
constructs to their explicit nmake-safe equivalents in a generated
copy (doc/Makefile.msvc), leaving doc/Makefile.in itself untouched for
the Unix/GNU make build. Verified by rewriting doc/Makefile.in this
way and building nasmdoc.pdf through it with GNU make standing in for
nmake.

Also, doc/Makefile.in expects doc/warnings.src, doc/perlbreq.src and
doc/pptok.src to have already been generated -- the Unix "doc" target
does this via the top-level Makefile.in before recursing into doc/,
but msvc.mak's docs: target had no equivalent step. warnings.src and
pptok.src already had msvc.mak rules (just not wired up as
prerequisites of docs:); perlbreq.src had no rule at all, since the
top-level Makefile.in generates it with a POSIX find/sed pipeline that
doesn't translate to Windows. Add tools/genperlbreq.pl, a portable
pure-Perl equivalent (using File::Find), and a doc\perlbreq.src rule
in msvc.mak that uses it; verified it produces output byte-identical
to the existing POSIX pipeline.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-07 15:26:53 -07:00
..
msvc.mak Mkfiles/msvc.mak: make the docs: target actually work under real nmake 2026-07-07 15:26:53 -07:00
openwcom.mak Mkfiles/: sync with Makefile.in 2026-07-06 13:54:38 -07:00
README additional note for running nmake building 2025-10-03 08:59:41 +08:00

These are pre-created Makefiles for various platforms, use them if
GNU autoconf/automake packages are not supported on your system.

The Makefiles are:

  Filename      Target		Compiler	Tested with
  ---------------------------------------------------------------------------
  msvc.mak	Win32		MS Visual C++	Visual Visual Studio 2013-2022

	For building on a Win32 host using Microsoft Visual C++.

	Usage:	nmake /f Mkfiles\msvc.mak
	(Note: make sure you have a MSVC Developer Command Prompt console before
	       running the nmake command)

	If the following tools are installed, the full installer package can
	be built:
		1. Perl (5.6 or later), e.g. ActivePerl or StrawberryPerl
		   http://strawberryperl.com/
		2. Nullsoft Scriptable Install System (makensis)
		   http://nsis.sourceforge.net/Download
		3. Ghostscript (ps2pdf) or Acrobat Distriller (acrodist)
		   https://downloads.ghostscript.com/
		4. The Google Roboto and Roboto Mono fonts
		   https://github.com/googlefonts/
		5. The Perl module Font::TTF (can usually be installed
		   via the "CPAN Client" in your Perl distribution)
		   http://search.cpan.org/~bhallissy/Font-TTF/
		6. The Perl module Sort::Versions (can usually be installed
		   via the "CPAN Client" in your Perl distribution)
		   http://search.cpan.org/~neilb/Sort-Versions-1.62/lib/Sort/Versions.pm

	The tools need to be in your current path.  To build the
	installer package, run:

		nmake /f Mkfiles\msvc.mak everything nsis

	NOTE: the preferred way to build NASM on Windows is to use
	the standard configure script under the MSYS2 environment.
	See http://www.msys2.org/.


  Filename      Target		Compiler	Tested with
  ---------------------------------------------------------------------------
  openwcom.mak	DOS,Win32,OS/2	OpenWatcom C	OpenWatcom 1.7 (Win32)
		Linux (386)			OpenWatcom 1.9 (Linux)

	For building on a DOS, OS/2, Win32 or Linux host using OpenWatcom.
	OpenWatcom can be downloaded from http://www.openwatcom.org/.

	Usage:	wmake /f Mkfiles/openwcom.mak <target>

	<target> is dos, win32, os2, or linux386.