mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-29 17:39:28 +02:00
build: remove bundled-readline wiring from the Makefiles (Patch 2)
With the bundled fallback gone (Patch 1) the readline/ special-casing is dead
machinery. Remove it:
* Makefile.in: $(submake) drops the `= readline` `-f`/mkdir branch and is now
plain `$(MAKE) -C <dir> <goal>`; the clean loop drops its matching branch;
`readline` is removed from BUNDLED_MODULES.
* scripts/defs.mak.in: remove the `ifeq (@MAKE_READLINE@,1) -I${MAGICSRC}/
readline` block (system readline headers are on the standard search path) and
the MAKE_READLINE variable; tidy the srcdir-fallback comment (only the
top-level Makefile uses it now).
* scripts/configure.in: drop AC_SUBST(MAKE_READLINE); regenerate configure.
The system readline link flags (rl_libs = -lreadline via READLINE_LIBS) are
unchanged. readline/ itself is deleted in the next patch.
Verified: no unsubstituted @MAKE_READLINE@; Tcl -j12 builds+installs 375 files
with readline/ not built; --without-tcl --disable-readline -j12 builds (x2).
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
committed by
R. Timothy Edwards
co-authored by
Claude Opus 4.8
parent
5d6c9899d4
commit
5e8b81cbcc
Vendored
-3
@@ -622,7 +622,6 @@ ac_includes_default="\
|
||||
|
||||
ac_subst_vars='LTLIBOBJS
|
||||
LIBOBJS
|
||||
MAKE_READLINE
|
||||
MAKE_CAIRO
|
||||
MAKE_GLU
|
||||
MAKE_GL
|
||||
@@ -9502,8 +9501,6 @@ MAKE_GLU=$usingGLU
|
||||
|
||||
MAKE_CAIRO=$usingCairo
|
||||
|
||||
MAKE_READLINE=0
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile:Makefile.in"
|
||||
|
||||
|
||||
@@ -2058,7 +2058,6 @@ AC_SUBST(MAKE_X11, [$usingX11])
|
||||
AC_SUBST(MAKE_GL, [$usingOGL])
|
||||
AC_SUBST(MAKE_GLU, [$usingGLU])
|
||||
AC_SUBST(MAKE_CAIRO, [$usingCairo])
|
||||
AC_SUBST(MAKE_READLINE, [0])
|
||||
|
||||
dnl Name the .in templates explicitly (relative to srcdir) so config.status can
|
||||
dnl find them when run from a separate build directory. Outputs land in the
|
||||
|
||||
+5
-13
@@ -19,12 +19,11 @@ MAGICSRC = @abs_top_srcdir@
|
||||
BUILD_TOP := $(abspath $(MAGICDIR))
|
||||
# Minimal srcdir fallback. Every module converted to Makefile.in sets
|
||||
# `srcdir` (and VPATH) from @srcdir@ *before* including this file. The only
|
||||
# Makefiles that do NOT are readline/ (intentionally never converted) and the
|
||||
# top-level Makefile; neither compiles magic sources through the pattern rules, so
|
||||
# neither needs VPATH. We only default `srcdir` -- derived from where make is
|
||||
# running (CURDIR, a build dir) relative to BUILD_TOP -- so that CPPFLAGS, which
|
||||
# lists -I${srcdir}, stays well-formed. The patsubst is an anchored prefix strip:
|
||||
# "" at the build top, "/readline" in the readline subdir.
|
||||
# Makefile that does NOT is the top-level Makefile, which does not compile magic
|
||||
# sources through the pattern rules and so needs no VPATH. We only default
|
||||
# `srcdir` -- derived from where make is running (CURDIR, a build dir) relative to
|
||||
# BUILD_TOP -- so that CPPFLAGS, which lists -I${srcdir}, stays well-formed. The
|
||||
# patsubst is an anchored prefix strip: "" at the build top.
|
||||
ifeq ($(origin srcdir),undefined)
|
||||
srcdir := $(MAGICSRC)$(patsubst $(BUILD_TOP)%,%,$(CURDIR))
|
||||
endif
|
||||
@@ -186,12 +185,6 @@ CXX = @CXX@
|
||||
# -I${srcdir}: this module's source dir, for same-directory headers
|
||||
CPPFLAGS = -I${GENINC} -I${MAGICSRC} -I${srcdir} @CPPFLAGS@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
# Bundled GNU readline: its headers use <readline/*.h> includes, so the readline
|
||||
# source's parent directory must be on the include path. Only for the bundled
|
||||
# build (@MAKE_READLINE@ = 1); a no-op with a system or disabled readline.
|
||||
ifeq (@MAKE_READLINE@,1)
|
||||
CPPFLAGS += -I${MAGICSRC}/readline
|
||||
endif
|
||||
DFLAGS_MAGICVERSION = -DMAGIC_VERSION=\"${MAGIC_VERSION}\" -DMAGIC_REVISION=\"${MAGIC_REVISION}\" -DMAGIC_COMMIT=\"${MAGIC_COMMIT}\" ${MAGIC_BUILDDATE_DEFS}
|
||||
ifeq (${MAGIC_BUILDDATE_DEFS},)
|
||||
DFLAGS_MAGICVERSION += "-DMAGIC_BUILDDATE=\"${MAGIC_BUILDDATE}\""
|
||||
@@ -244,4 +237,3 @@ MAKE_X11 = @MAKE_X11@
|
||||
MAKE_GL = @MAKE_GL@
|
||||
MAKE_GLU = @MAKE_GLU@
|
||||
MAKE_CAIRO = @MAKE_CAIRO@
|
||||
MAKE_READLINE = @MAKE_READLINE@
|
||||
|
||||
Reference in New Issue
Block a user