summaryrefslogtreecommitdiff
path: root/maintMakefile
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2017-11-12 17:44:38 -0500
committerPaul Smith <psmith@gnu.org>2017-11-18 09:31:31 -0500
commitaa44e66c8f31370a7d785259affb4eb32f341764 (patch)
tree122bcde858547c53adf03adbfcebae41c306e090 /maintMakefile
parenta7e0dd98e430c3fb7f66b8cc30a1868353d214bd (diff)
downloadmake-git-aa44e66c8f31370a7d785259affb4eb32f341764.tar.gz
Remove unsupported build facilities.
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.
Diffstat (limited to 'maintMakefile')
-rw-r--r--maintMakefile39
1 files changed, 13 insertions, 26 deletions
diff --git a/maintMakefile b/maintMakefile
index 4a2d62ce..19a154f4 100644
--- a/maintMakefile
+++ b/maintMakefile
@@ -35,16 +35,8 @@ AM_CPPFLAGS += $(MAKE_MAINTAINER_MODE)
# I want this one but I have to wait for the const cleanup!
# -Wwrite-strings
-# Find the glob source files... this might be dangerous, but we're maintainers!
-globsrc := $(wildcard glob/*.c)
-globhdr := $(wildcard glob/*.h)
-
TEMPLATES = README README.DOS README.W32 README.OS2 \
config.ami configh.dos config.h.W32 config.h-vms
-MTEMPLATES = Makefile.DOS SMakefile
-
-# These are built as a side-effect of the dist rule
-#all-am: $(TEMPLATES) $(MTEMPLATES) build.sh.in
# Create preprocessor output files--GCC specific!
%.i : %.c
@@ -61,24 +53,20 @@ $(TEMPLATES) : % : %.template Makefile
# Construct Makefiles by adding on dependencies, etc.
#
-$(MTEMPLATES) : % : %.template .dep_segment Makefile
+Basic.mk: Basic.mk.template .dep_segment Makefile
rm -f $@
sed -e 's@%VERSION%@$(VERSION)@g' \
- -e 's@%PROGRAMS%@$(bin_PROGRAMS)@g' \
- -e 's@%SOURCES%@$(filter-out remote-%,$(make_SOURCES)) remote-$$(REMOTE).c@g' \
- -e 's@%OBJECTS%@$(filter-out remote-%,$(make_OBJECTS)) remote-$$(REMOTE).o@g' \
- -e 's@%GLOB_SOURCES%@$(globsrc) $(globhdr)@g' \
- -e 's@%GLOB_OBJECTS%@$(globsrc:glob/%.c=%.o)@g' \
+ -e 's@%make_SOURCES%@$(filter %.c,$(make_SRCS))@g' \
+ -e 's@%glob_SOURCES%@$(filter %.c,$(glob_SRCS))@g' \
+ -e 's@%w32_SOURCES%@$(filter %.c,$(w32_SRCS))@g' \
+ -e 's@%vms_SOURCES%@$(filter %.c,$(vms_SRCS))@g' \
+ -e 's@%amiga_SOURCES%@$(filter %.c,$(amiga_SRCS))@g' \
$< > $@
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
- cat $(word 2,$^) >>$@
- chmod a-w $@
-
-NMakefile: NMakefile.template .dep_segment Makefile
- rm -f $@
- cp $< $@
- echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
- sed 's/^\([^ ]*\)\.o:/$$(OUTDIR)\/\1.obj:/' $(word 2,$^) >>$@
+ sed -e 's@^\([^ ]*\)\.o:@$$(OUTDIR)/\1.$$(OBJEXT):@' \
+ -e 's@\([^ ]*\.[ch]\)@$$(SRCDIR)/\1@g' \
+ -e 's@$$(SRCDIR)/config.h@$$(OUTDIR)/config.h@g' \
+ $(word 2,$^) >>$@
chmod a-w $@
# Construct build.sh.in
@@ -86,15 +74,14 @@ NMakefile: NMakefile.template .dep_segment Makefile
build.sh.in: build.template Makefile
rm -f $@
sed -e 's@%objs%@$(patsubst %.o,%.$${OBJEXT},$(filter-out remote-%,$(make_OBJECTS)))@g' \
- -e 's@%globobjs%@$(patsubst %.c,%.$${OBJEXT},$(globsrc))@g' \
+ -e 's@%globobjs%@$(patsubst %.c,%.$${OBJEXT},$(filter %.c,$(glob_SRCS)))@g' \
$< > $@
chmod a-w+x $@
-# Use automake to build a dependency list file, for "foreign" makefiles like
-# Makefile.DOS.
+# Use automake to build a dependency list file, for Makebase.mk.
#
-# Automake used to have a --generate-deps flag, but it's gone now, so we have
+# Automake used to have a --generate-deps flag but it's gone now, so we have
# to do it ourselves.
#
DEP_FILES := $(wildcard $(DEPDIR)/*.Po)