Skip to content

Commit

Permalink
Remove unsupported build facilities.
Browse files Browse the repository at this point in the history
Over time the non-standard build and install systems (nmake files,
smake files, Visual Studio project files, etc.) have atrophied and
maintaining them is not worth the effort, for such a simple utility
as make.  Remove all the non-standard build tool support and unify
OS-specific build rules under a basic set of (GNU make) makefiles.

Preserve the existing bootstrapping scripts (for POSIX, Windows,
and MS-DOS).  Also the existing VMS build scripts are left unchanged:
I don't have enough experience with VMS to venture into this area.
Perhaps one of the VMS maintainers might like to determine whether
conversion would be appropriate.

Rather than create libraries for w32 and glob (non-POSIX), simply
link the object files directly to remove the complexity.

* NEWS: Update with user-facing notes.
* Makefile.am: Clean up to use the latest automake best practices.
Build Windows code directly from the root makefile to avoid recursion.
* README.Amiga, README.DOS.template, README.W32.template: Updated.
* INSTALL: Point readers at the README.git file.
* maintMakefile: Remove obsolete files.  Create Basic.mk file.
* Basic.mk.template, mk/*.mk: Create basic GNU make-based makefiles.
* build_w32.bat: Copy Basic.mk to Makefile
* configure.ac: We no longer need AM_PROG_AR.
* dosbuild.bat: Rename to builddos.bat.  Incorporate configure.bat.
* Makefile.DOS.template: Remove.
* NMakefile.template, w32/subproc/NMakefile: Remove.
* SMakefile.template, glob/SMakefile, glob/SCOPTIONS, make.lnk: Remove.
* configure.bat, glob/configure.bat: Remove.
* w32/Makefile.am: Remove.
* make_msvc_net2003.sln, make_msvc_net2003.vcproj: Remove.
  • Loading branch information
madscientist committed Nov 18, 2017
1 parent a7e0dd9 commit aa44e66
Show file tree
Hide file tree
Showing 32 changed files with 550 additions and 1,817 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ID
TAGS
.*gdbinit
.gdb_history
.vscode
*~
#*
.#*
Expand All @@ -11,6 +12,7 @@ TAGS
ABOUT-NLS
Makefile
Makefile.in
Basic.mk
aclocal.m4
autom4te.cache
config.cache
Expand Down Expand Up @@ -44,13 +46,10 @@ GccRel/
.dep_segment
.check-git-HEAD
ChangeLog
Makefile.DOS
NMakefile
README
README.DOS
README.OS2
README.W32
SMakefile
build.sh
build.sh.in
config.ami
Expand Down
103 changes: 103 additions & 0 deletions Basic.mk.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Basic GNU -*-Makefile-*- to build GNU make
#
# NOTE:
# If you have no 'make' program at all to process this makefile:
# * On Windows, run ".\buildw32.bat" to bootstrap one.
# * On MS-DOS, run ".\builddos.bat" to bootstrap one.
#
# Once you have a GNU make program created, you can use it with this makefile
# to keep it up to date if you make changes, as:
#
# make.exe -f Makew32.mk
#
# Copyright (C) 2017 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.

all:

make_SOURCES = %make_SOURCES% remote-stub.c
glob_SOURCES = %glob_SOURCES%
w32_SOURCES = %w32_SOURCES%
vms_SOURCES = %vms_SOURCES%
amiga_SOURCES = %amiga_SOURCES%

OUTDIR = .
SRCDIR = .

OBJEXT = o
EXEEXT =

PROG = $(OUTDIR)/make$(EXEEXT)

LD = $(CC)

# Reserved for command-line override
CPPFLAGS =
CFLAGS = -g -O2
LDFLAGS =

prog_SOURCES = $(make_SOURCES)

extra_CPPFLAGS = -DHAVE_CONFIG_H -I$(OUTDIR) -I$(SRCDIR)
extra_CFLAGS =
extra_LDFLAGS = $(extra_CFLAGS) $(CFLAGS)

C_SOURCE = -c
OUTPUT_OPTION = -o $@
LINK_OUTPUT = -o $@

# Command lines

COMPILE.cmd = $(CC) $(extra_CFLAGS) $(CFLAGS) $(extra_CPPFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(OUTPUT_OPTION) $(C_SOURCE) $<

LINK.cmd = $(LD) $(extra_LDFLAGS) $(LDFLAGS) $(TARGET_ARCH) $^ $(LDLIBS) $(LINK_OUTPUT)

CHECK.cmd = cd tests && ./run_make_tests -make $(shell cd $(<D) && pwd)/$(<F)

MKDIR = mkdir -p
MKDIR.cmd = $(MKDIR) $@

RM = rm -f
RM.cmd = $(RM) $(OBJECTS) $(PROG)

# Load overrides for the above variables.
include $(wildcard mk/$(lastword $(subst -, ,$(MAKE_HOST)).mk))

VERSION = %VERSION%

VPATH = $(SRCDIR)

all: $(PROG)

OBJECTS = $(patsubst %.c,$(OUTDIR)/%.$(OBJEXT),$(prog_SOURCES))

$(PROG): $(OBJECTS)
$(LINK.cmd)

.SECONDEXPANSION:
$(OBJECTS): $(OUTDIR)/%.$(OBJEXT): %.c | $$(@D)/.
$(COMPILE.cmd)

$(addsuffix .,$(sort $(dir $(OBJECTS)))):
$(MKDIR.cmd)

check: $(PROG)
$(CHECK.cmd)

clean:
$(RM.cmd)

.PHONY: all check clean
10 changes: 9 additions & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.

Installation From Git
=====================

If you are trying to build GNU make from a Git clone rather than a
downloaded source distribution file, see README.git for steps you
must take to configure your workspace before you can use the
instructions below.


Basic Installation
==================

Expand Down Expand Up @@ -228,4 +237,3 @@ overridden in the site shell script).

`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

Loading

0 comments on commit aa44e66

Please sign in to comment.