diff options
-rw-r--r-- | .github/workflows/ci.yml | 14 | ||||
-rw-r--r-- | .github/workflows/nightly.yml | 4 | ||||
-rw-r--r-- | .gitmodules | 2 | ||||
-rw-r--r-- | INSTALL | 29 | ||||
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | configure.ac | 12 | ||||
m--------- | contrib/scinterm | 0 | ||||
-rw-r--r-- | contrib/scintilla.am | 65 | ||||
-rwxr-xr-x | debian/rules | 6 | ||||
-rw-r--r-- | freebsd/Makefile | 4 | ||||
-rw-r--r-- | src/Makefile.am | 5 | ||||
-rw-r--r-- | tests/Makefile.am | 1 |
12 files changed, 57 insertions, 88 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18ae819..b31bc45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,10 +48,8 @@ jobs: run: xvfb-run -a make check TESTSUITEFLAGS="--verbose" - name: Build Developer Documentation run: cd doc && make devdoc - # FIXME: Will try to perform an out-of-tree build which will not - # work without manual intervention due to Scintilla. -# - name: make distcheck -# run: xvfb-run -a make distcheck + - name: make distcheck + run: xvfb-run -a make distcheck - name: Build Source Tarball run: make dist @@ -86,9 +84,7 @@ jobs: run: make check TESTSUITEFLAGS="--verbose" - name: Build Developer Documentation run: cd doc && make devdoc - # FIXME: Will try to perform an out-of-tree build which will not - # work without manual intervention due to Scintilla. -# - run: make distcheck + - run: make distcheck - name: Build Source Tarball run: make dist @@ -135,8 +131,6 @@ jobs: run: make check TESTSUITEFLAGS="--verbose" - name: Build Developer Documentation run: cd doc && make devdoc - # FIXME: Will try to perform an out-of-tree build which will not - # work without manual intervention due to Scintilla. -# - run: make distcheck + - run: make distcheck - name: Build Source Tarball run: make dist diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9c80c87..f4d8caa 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -189,9 +189,7 @@ jobs: LDFLAGS: -flto run: | autoreconf -i - mkdir -p build-wingui/contrib build-wincon/contrib - cp -r contrib/{scintilla,lexilla,scinterm} build-wingui/contrib - cp -r contrib/{scintilla,lexilla,scinterm} build-wincon/contrib + mkdir build-wingui build-wincon (cd build-wingui ../configure --with-interface=pdcurses-gui --enable-html-manual --program-prefix=g \ PDCURSES_LIBS="-lpdcurses_wingui -lgdi32 -lcomdlg32 -lwinmm") diff --git a/.gitmodules b/.gitmodules index 3636830..c09dc98 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,7 +4,7 @@ ignore = untracked [submodule "scinterm"] path = contrib/scinterm - url = https://github.com/orbitalquark/scinterm.git + url = https://github.com/rhaberkorn/scinterm.git [submodule "lexilla"] path = contrib/lexilla url = https://github.com/rhaberkorn/lexilla.git @@ -3,7 +3,7 @@ Installation Instructions Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. -Copyright (C) 2013-2023 Robin Haberkorn +Copyright (C) 2013-2024 Robin Haberkorn Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -47,7 +47,7 @@ installed by the user manually: * Scintilla (v5.3.0 or later): http://www.scintilla.org/ * When choosing the Curses interface: - * Scinterm (v4.0 or later): + * Scinterm (v5.2 or later): http://foicica.com/scinterm/ * Lexilla (v5.0.0 or later, optional): https://www.scintilla.org/Lexilla.html @@ -137,31 +137,6 @@ Windows releases need special configuration options. Building these packages is automated by the `./distribute` script (a standalone Makefile script). -Out of Tree Builds -================== - -Like any Autoconf/Automake-based project, SciTECO can generally -be built out-of-tree (in a different directory than its sources). -This is often useful, especially when cross-compiling. -Unfortunately, the Scintilla (and related libraries') build-system -does not support out-of-tree builds, so even though Scintilla has been tied -into SciTECO's build system for convenience, out-of-tree builds -cannot be performed directly as Scintilla would still be built -in SciTECO's source directory by default. - -However, you may copy Scintilla, Scinterm and Lexilla into -SciTECO's build directory. -An out-of-tree build of SciTECO can thus be achieved using the -following steps (supposing that the build directory will be -a subdirectory of the Git repository called `build-dir`): - - $ mkdir -p build-dir/contrib - $ cp -r contrib/{scintilla,scinterm,lexilla} build-dir/contrib/ - $ cd build-dir - $ ../configure - $ make - ... - For more details on building Autoconf-based projects refer to the remainder of this document which covers installing Autoconf-based projects in general. @@ -102,9 +102,6 @@ Known Bugs: window titles on exit using XTerm. * Glib (error) messages are not integrated with SciTECO's logging system. - * Out-of-tree builds are broken. - See contrib/scintilla.am. - See also https://github.com/ScintillaOrg/lexilla/issues/266 * Gtk on Unix: On ^Z, we do not suspend properly. The window is still shown. This would be a useful feature especially with --xembed on st. Perhaps we should try to catch SIGTSTP? diff --git a/configure.ac b/configure.ac index d12dda5..511d169 100644 --- a/configure.ac +++ b/configure.ac @@ -191,8 +191,8 @@ AM_CPPFLAGS="$AM_CPPFLAGS -D'SCITECODATADIR=\"\$(scitecodatadir)\"' \ # Scintilla (some platforms ship with it). AC_ARG_WITH(scintilla, AS_HELP_STRING([--with-scintilla=PATH], - [Specify Scintilla's path [default=./contrib/scintilla]]), - [SCINTILLA_PATH=$withval], [SCINTILLA_PATH=./contrib/scintilla]) + [Specify Scintilla's path [default=SRCDIR/contrib/scintilla]]), + [SCINTILLA_PATH=$withval], [SCINTILLA_PATH=$srcdir/contrib/scintilla]) SCINTILLA_PATH=`canonicalize $SCINTILLA_PATH` AC_SUBST(SCINTILLA_PATH) @@ -200,15 +200,15 @@ CPPFLAGS="$CPPFLAGS -I$SCINTILLA_PATH/include" AC_ARG_WITH(scinterm, AS_HELP_STRING([--with-scinterm=PATH], - [Specify Scinterm's path [default=./contrib/scinterm]]), - [SCINTERM_PATH=$withval], [SCINTERM_PATH=./contrib/scinterm]) + [Specify Scinterm's path [default=SRCDIR/contrib/scinterm]]), + [SCINTERM_PATH=$withval], [SCINTERM_PATH=$srcdir/contrib/scinterm]) SCINTERM_PATH=`canonicalize $SCINTERM_PATH` AC_SUBST(SCINTERM_PATH) AC_ARG_WITH(lexilla, AS_HELP_STRING([--with-lexilla=PATH], - [Specify Lexilla's path [default=./contrib/lexilla]]), - [LEXILLA_PATH=$withval], [LEXILLA_PATH=./contrib/lexilla]) + [Specify Lexilla's path [default=SRCDIR/contrib/lexilla]]), + [LEXILLA_PATH=$withval], [LEXILLA_PATH=$srcdir/contrib/lexilla]) AM_CONDITIONAL(LEXILLA, [test x$LEXILLA_PATH != xno]) if [[ x$LEXILLA_PATH != xno ]]; then LEXILLA_PATH=`canonicalize $LEXILLA_PATH` diff --git a/contrib/scinterm b/contrib/scinterm -Subproject 2701ad38c5bc46d3b0e59ea8cf11dee1488d76a +Subproject 2d5a738e6bc55ff45433492841735b2407ede01 diff --git a/contrib/scintilla.am b/contrib/scintilla.am index 55511b0..9ba728b 100644 --- a/contrib/scintilla.am +++ b/contrib/scintilla.am @@ -1,33 +1,32 @@ # We use the existing Scintilla/Lexilla Makefile build system to # avoid redundancies and maintainance overhead. # These build systems produce static libraries (*.a). -# This however has two diadvantages: -# 1.) Out-of-tree builds are not straight forward and require -# manually cloning the submodules into the build system. -# `make distcheck` is consequently also broken. -# Lexilla already has DIR_O, that could be used for proper -# out of tree builds, but Scintilla is still lacking it. -# 2.) We cannot add plain static libraries to libtool convenience -# libraries using LIBADD. -# Therefore, we cannot wrap Scintilla and Lexilla into a convenience -# library. -# That's why this file must instead be included everywhere where -# scintilla.a and liblexilla.a are referenced and they must be added -# to programs using LDADD. +# This however has the following disadvantages: +# +# * We cannot add plain static libraries to libtool convenience +# libraries using LIBADD. +# Therefore, we cannot wrap Scintilla and Lexilla into a convenience +# library. +# That's why this file must instead be included everywhere where +# scintilla.a and liblexilla.a are referenced and they must be added +# to programs using LDADD. + +LIBSCINTILLA = @abs_top_builddir@/contrib/scintilla/bin/scintilla.a if INTERFACE_GTK -MAKE_SCINTILLA = $(MAKE) -C @SCINTILLA_PATH@/gtk \ +MAKE_SCINTILLA = $(MAKE) -C @top_builddir@/contrib/scintilla/bin \ + -f @SCINTILLA_PATH@/gtk/makefile \ + srcdir=@SCINTILLA_PATH@/gtk \ + COMPLIB=$(LIBSCINTILLA) \ GTK3=yes CONFIGFLAGS='@LIBGTK_CFLAGS@' \ CXXFLAGS='@SCINTILLA_CXXFLAGS@' else -# NOTE: The VPATH hack allows us to keep Scinterm separate from -# the Scintilla repo and avoid using recursive submodules. -# -# FIXME: There is currently no way to override the standard optimization -# flags of Scinterm, so we pass them in CURSES_FLAGS. -MAKE_SCINTILLA = $(MAKE) -C @SCINTILLA_PATH@/bin -f @SCINTERM_PATH@/Makefile \ - VPATH=@SCINTERM_PATH@ \ - CURSES_FLAGS='@PDCURSES_CFLAGS@ @XCURSES_CFLAGS@ @NCURSES_CFLAGS@ @SCINTILLA_CXXFLAGS@' +MAKE_SCINTILLA = $(MAKE) -C @top_builddir@/contrib/scintilla/bin \ + -f @SCINTERM_PATH@/Makefile \ + srcdir=@SCINTERM_PATH@ basedir=@SCINTILLA_PATH@ \ + scintilla=$(LIBSCINTILLA) \ + CXXFLAGS='@SCINTILLA_CXXFLAGS@' \ + CURSES_FLAGS='@PDCURSES_CFLAGS@ @XCURSES_CFLAGS@ @NCURSES_CFLAGS@' endif # Pass toolchain configuration to Scintilla. @@ -40,21 +39,33 @@ MAKE_SCINTILLA += CC='@CC@' CXX='@CXX@' \ # If it's up to date, the additional recursive # make call does not hurt. .PHONY: make-scintilla +# FIXME: deps.mak cannot be generated when building out-of-tree. +# Also this would draw in a Python dependency. +# It needs to be removed in clean-local-scintilla to appease `make distcheck`. make-scintilla: - $(MAKE_SCINTILLA) ../bin/scintilla.a + mkdir -p @top_builddir@/contrib/scintilla/bin + touch @top_builddir@/contrib/scintilla/bin/deps.mak + $(MAKE_SCINTILLA) $(LIBSCINTILLA) # scintilla.a itself is not phony. # This avoids unnecessary relinking if it is # up to date. # Also note the ; which defines this recipe as # empty. -@SCINTILLA_PATH@/bin/scintilla.a : make-scintilla; +$(LIBSCINTILLA) : make-scintilla; .PHONY: clean-local-scintilla clean-local-scintilla: + mkdir -p @top_builddir@/contrib/scintilla/bin $(MAKE_SCINTILLA) clean + test "@abs_top_srcdir" = "@abs_top_builddir@" || \ + $(RM) -f @top_builddir@/contrib/scintilla/bin/deps.mak + +LIBLEXILLA = @abs_top_builddir@/contrib/lexilla/bin/liblexilla.a MAKE_LEXILLA = $(MAKE) -C @LEXILLA_PATH@/src \ + DIR_O=@abs_top_builddir@/contrib/lexilla/bin \ + DIR_BIN=@abs_top_builddir@/contrib/lexilla/bin \ SCINTILLA_INCLUDE=@SCINTILLA_PATH@/include \ CXXFLAGS='@SCINTILLA_CXXFLAGS@' \ CC='@CC@' CXX='@CXX@' \ @@ -68,12 +79,14 @@ MAKE_LEXILLA += BASE_FLAGS='' .PHONY: make-lexilla make-lexilla: - $(MAKE_LEXILLA) ../bin/liblexilla.a + mkdir -p @top_builddir@/contrib/lexilla/bin + $(MAKE_LEXILLA) $(LIBLEXILLA) -@LEXILLA_PATH@/bin/liblexilla.a : make-lexilla; +$(LIBLEXILLA) : make-lexilla; .PHONY: clean-local-lexilla clean-local-lexilla: + mkdir -p @top_builddir@/contrib/lexilla/bin $(MAKE_LEXILLA) clean # NOTE: using a separate `clean-local-scintilla` diff --git a/debian/rules b/debian/rules index 77936a9..fb1d65e 100755 --- a/debian/rules +++ b/debian/rules @@ -34,9 +34,6 @@ build build-arch build-indep: build-curses-stamp build-gtk-stamp; build-curses-stamp: dh_testdir rm -rf build-curses - mkdir -p build-curses/contrib - cp -r contrib/scintilla contrib/scinterm contrib/lexilla \ - build-curses/contrib/ dh_auto_configure -Bbuild-curses -- \ --with-interface=ncurses dh_auto_build -Bbuild-curses @@ -48,9 +45,6 @@ build-curses-stamp: build-gtk-stamp: dh_testdir rm -rf build-gtk - mkdir -p build-gtk/contrib - cp -r contrib/scintilla contrib/lexilla \ - build-gtk/contrib/ dh_auto_configure -Bbuild-gtk -- \ --program-prefix=g \ --with-interface=gtk diff --git a/freebsd/Makefile b/freebsd/Makefile index 5b52941..94368cf 100644 --- a/freebsd/Makefile +++ b/freebsd/Makefile @@ -27,9 +27,7 @@ USE_GNOME= glib20 GNU_CONFIGURE= yes CONFIGURE_ARGS= -# Out-of-tree builds are broken without special preparation -# (see INSTALL in SciTECO source distribution). -#CONFIGURE_OUTSOURCE=yes +CONFIGURE_OUTSOURCE=yes MAKEFILE= GNUmakefile TEST_TARGET= check diff --git a/src/Makefile.am b/src/Makefile.am index b9aca8a..306dbe9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -67,10 +67,9 @@ noinst_PROGRAMS = sciteco-minimal sciteco_minimal_SOURCES = symbols-scintilla.c symbols-scilexer.c : sciteco-minimal$(EXEEXT) endif -sciteco_minimal_LDADD = libsciteco-base.la \ - @SCINTILLA_PATH@/bin/scintilla.a +sciteco_minimal_LDADD = libsciteco-base.la $(LIBSCINTILLA) if LEXILLA -sciteco_minimal_LDADD += @LEXILLA_PATH@/bin/liblexilla.a +sciteco_minimal_LDADD += $(LIBLEXILLA) endif # Scintilla is unfortunately still written in C++, so we must force # Automake to use the C++ linker when linking the binaries. diff --git a/tests/Makefile.am b/tests/Makefile.am index 997a473..eea6b67 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -32,6 +32,7 @@ installcheck-local: atconfig atlocal $(TESTSUITE) clean-local: test ! -f '$(TESTSUITE)' || \ $(SHELL) '$(TESTSUITE)' --clean + $(RM) -f atconfig AUTOM4TE = $(SHELL) $(top_srcdir)/config/missing --run autom4te AUTOTEST = $(AUTOM4TE) --language=autotest |