aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2014-10-07 19:23:45 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2014-10-07 19:23:45 +0200
commit08c58ff72efd61380e82329609c552d3c446071d (patch)
treed4200ee62204797e325df4446784f982e4250faa
parentaf17bd73e210f16c8947acb8119ff9e2d3c2f054 (diff)
parent35df3d7d0928b57166b2da800d40d38f079ce768 (diff)
downloadsciteco-08c58ff72efd61380e82329609c552d3c446071d.tar.gz
Merge branch 'master' of https://github.com/rhaberkorn/sciteco
-rw-r--r--.gitmodules5
-rw-r--r--INSTALL139
-rw-r--r--Makefile.am12
-rw-r--r--configure.ac8
-rwxr-xr-xdebian/rules10
-rwxr-xr-xdistribute46
-rw-r--r--patches/050-scinterm-lexlib.patch17
-rw-r--r--patches/README3
m---------scintilla0
-rw-r--r--scintilla.am22
-rw-r--r--src/Makefile.am1
11 files changed, 121 insertions, 142 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..e7c042b
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,5 @@
+[submodule "scintilla"]
+ path = scintilla
+ url = git@github.com:rhaberkorn/scintilla-mirror.git
+ branch = sciteco-dev
+ ignore = all
diff --git a/INSTALL b/INSTALL
index d2e6726..944bc9b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -15,92 +15,87 @@ SciTECO Build and Runtime Dependencies
* Autotools, GNU C/C++ (v4.4 or later) or LLVM/gcc or LLVM/Clang
* Glib 2 as a cross-platform runtime library:
- https://launchpad.net/~robin-haberkorn/+archive/sciteco
- * Scintilla (v3.3.7 or later):
- http://www.scintilla.org/
- * Curses interface:
- * Scinterm (v1.2 or later):
- http://foicica.com/scinterm/
+ https://developer.gnome.org/glib/
+ * When choosing the Curses interface:
* NCurses (http://www.gnu.org/software/ncurses/),
- PDCurses/XCurses (http://pdcurses.sourceforge.net/) or
- PDCurses/Win32a (http://www.projectpluto.com/win32a.htm)
+ PDCurses/XCurses (http://pdcurses.sourceforge.net/),
+ PDCurses/Win32a (http://www.projectpluto.com/win32a.htm) or
+ PDCurses/EMCurses (https://github.com/rhaberkorn/emcurses)
* other curses implementations might work as well but are untested
- * GTK interface:
+ * When choosing the GTK interface:
* GTK+ 2: http://www.gtk.org/
+ * GObject Builder: http://www.jirka.org/gob.html
* Groff (only when formatting HTML manuals)
* Doxygen (only when generating developer documentation)
-When you are building from a source bundle (sciteco-*-bundle.tar.gz),
-you will not need to download Scintilla or Scinterm.
-
-Building from Source Bundle
-===========================
-
-The easiest way to build SciTECO is by using a source bundle:
-1. Make sure you can satisfy all the build dependencies (except
- Scintilla/Scinterm which is included in the bundle).
-2. Unpack the source bundle. A directory "sciteco-VERSION" will
- be created (VERSION is of course the release version you downloaded).
-3. Build Scintilla.
- For building Scintilla/GTK+ something like this should be sufficient:
- # cd sciteco-VERSION/scintilla/gtk
- # make
- For building Scintilla/Curses something like this should be sufficient:
- # cd sciteco-VERSION/scintilla/scinterm
- # make
- This will create sciteco-VERSION/scintilla/bin/scintilla.a
-4. Build SciTECO.
- An ordinary Autoconf build system is used, so something like this
- should be sufficient:
- # cd sciteco-VERSION/sciteco
- # ./configure --with-interface=<INTERFACE>
- # make
- Where <INTERFACE> is the SciTECO interface to use.
- It must match the Scintilla interface you have compiled.
- For instance if you built Scintilla with Scinterm, you may use the
- "ncurses" and "pdcurses" SciTECO interfaces.
-5. To install use something like:
- # sudo make install
-6. You are recommended to use the included "teco.ini" as a starting point for your profile,
- so copy it to "~/.teco_ini".
+These dependencies are bundled with the SciTECO Git repository
+and with source tar balls, so they usually do not have to be
+installed by the user manually:
-For more details on building Autoconf-based projects refer to the
-remainder of this document.
+ * Scintilla (v3.4.2 to v3.4.4):
+ http://www.scintilla.org/
+ * When choosing the Curses interface:
+ * Scinterm (v1.3 or later):
+ http://foicica.com/scinterm/
Building from Source Tar Ball or Repository
===========================================
-You may also download a source tarball (sciteco-VERSION.tar.gz)
+This is now the only way to build SciTECO from source.
+You may either download a source tarball (sciteco-VERSION.tar.gz)
or build from a cloned Git repository.
-When building from Git, you must first create the ./configure script:
-# autoreconf -i
+Cloning the Git repository is recommended because SciTECO is not
+released often -- the source tarballs you find will probably be
+quite outdated.
+
+When cloning the repository, you should make sure you have initialized
+the submodules, so that SciTECO can build a verified and prepared
+version of Scintilla/Scinterm autmatically.
+Just make sure you have cloned your repository as follows:
+
+ $ git clone https://github.com/rhaberkorn/sciteco.git
+ $ cd sciteco/
+ $ git submodule update --init --recursive
+
+When building from Git, you must first generate the ./configure
+script using Autoconf/Automake:
+
+ $ autoreconf -i
+
If you are using a source tarball ./configure is already included.
+When using a source tarball you do not need to have Autoconf or
+Automake installed.
-The remainder of the build process is similar to building
-from a source bundle:
- * Get Scintilla and Scinterm. The latter is only required if you
- would like to build a Curses version of SciTECO.
- * Install Scintilla/Scinterm according to their READMEs.
- Usually you unpack Scinterm into a subdirectory of Scintilla
- and run make...
- * But before that, apply the patches contained in the SciTECO
- sources: patches/*.patch
- For instance:
- # cd ~/scintilla
- # for patch in SCITECO_PATH/patches/*.patch; do
- > patch --merge -p2 <$patch
- > done
- * Build SciTECO just like described above.
- If you did not use the same directory layout as the source bundles
- do, you may have to specify the
- --with-scintilla
- and
- --with-scinterm
- site-configuration (./configure) options to tell SciTECO where
- to find Scintilla/Scinterm.
-
-The remainder of this document are the standard GNU installation
-instructions.
+Now you are ready to configure the build system.
+Make sure you have all the build and run-time dependencies
+installed that have been mentioned above (except
+Scintilla/Scinterm which is bundled with SciTECO by default).
+Usually as with other Autoconf projects something like this
+is sufficient:
+
+ $ ./configure
+
+This will configure SciTECO for the ncurses user interface.
+The user interface may be changed with the "--with-interface=<INTERFACE>"
+option to the ./configure command.
+You may use `./configure --help` to get an overview of all available
+Autoconf and SciTECO build time options.
+
+If ./configure runs successfully you may build SciTECO with a simple
+
+ $ make
+
+This will also automatically build Scintilla (and Scinterm if necessary).
+To install SciTECO, type something like:
+
+ $ sudo make install
+
+You are recommended to use the included "teco.ini" as a starting point
+for your profile, so copy it to your $HOME directory at "~/.teco_ini".
+
+For more details on building Autoconf-based projects refer to the
+remainder of this document which covers installing Autoconf-based
+projects in general.
Basic Installation
==================
diff --git a/Makefile.am b/Makefile.am
index b3aaf24..c019f96 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,13 @@ noinst_HEADERS = compat/bsd/sys/cdefs.h \
compat/bsd/sys/queue.h \
compat/bsd/sys/tree.h
-EXTRA_DIST = $(wildcard @top_srcdir@/patches/*.patch) \
- README
+EXTRA_DIST = README TODO
-EXTRA_DIST += TODO
+# Distribute entire scintilla directory and
+# do some manual cleanup
+EXTRA_DIST += scintilla
+dist-hook:
+ rm -rf `find $(distdir)/scintilla -name *.o` \
+ $(distdir)/scintilla/bin/scintilla.a
+ rm -rf `find $(distdir)/scintilla -name ".git*"` \
+ `find $(distdir)/scintilla -name ".hg*"`
diff --git a/configure.ac b/configure.ac
index 1e13986..8b67de1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,9 @@ AC_PROG_CC_C99
AC_PROG_GREP
AC_PROG_INSTALL
+# Required by the Scintilla build process:
+AC_CHECK_TOOL(AR, ar)
+
# Emscripten uses Clang as well
AM_CONDITIONAL(CLANG, [$CXX --version | $GREP -E "clang|Emscripten" >/dev/null])
@@ -99,8 +102,8 @@ esac
#
AC_ARG_WITH(scintilla,
AS_HELP_STRING([--with-scintilla=PATH],
- [Specify Scintilla's path [default=../scintilla]]),
- [SCINTILLA_PATH=$withval], [SCINTILLA_PATH=../scintilla])
+ [Specify Scintilla's path [default=./scintilla]]),
+ [SCINTILLA_PATH=$withval], [SCINTILLA_PATH=./scintilla])
SCINTILLA_PATH=`canonicalize $SCINTILLA_PATH`
AC_SUBST(SCINTILLA_PATH)
@@ -111,6 +114,7 @@ AC_ARG_WITH(scinterm,
[Specify Scinterm's path [default=SCINTILLA_PATH/scinterm]]),
[SCINTERM_PATH=$withval], [SCINTERM_PATH=$SCINTILLA_PATH/scinterm])
SCINTERM_PATH=`canonicalize $SCINTERM_PATH`
+AC_SUBST(SCINTERM_PATH)
AC_ARG_WITH(interface,
AS_HELP_STRING([--with-interface=ncurses|pdcurses|emcurses|gtk],
diff --git a/debian/rules b/debian/rules
index 6c6a679..84c4bc6 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,19 +4,17 @@
#export DH_VERBOSE=1
%:
- dh $@ -Dsciteco
+ dh $@
build:
dh_testdir
- dh_auto_build -Dscintilla/scinterm
- dh_auto_configure -Dsciteco -- \
+ dh_auto_configure -- \
--enable-bootstrap \
--with-interface=ncurses
- dh_auto_build -Dsciteco
+ dh_auto_build
touch $@
clean:
dh_testdir
- dh_auto_clean -Dscintilla/scinterm
- dh_auto_clean -Dsciteco
+ dh_auto_clean
dh_clean
diff --git a/distribute b/distribute
index 2af9c6c..195ac6a 100755
--- a/distribute
+++ b/distribute
@@ -3,39 +3,10 @@
SCITECO_VERSION = 0.6
SCITECO_SRC = sciteco-$(SCITECO_VERSION).tar.gz
-SCINTILLA_VERSION = 339
-SCINTILLA_SRC = scintilla$(SCINTILLA_VERSION).tgz
-
-SCINTERM_VERSION = 1.2
-SCINTERM_SRC = scinterm_$(SCINTERM_VERSION).zip
-
$(SCITECO_SRC):
$(MAKE) dist
-$(SCINTILLA_SRC):
- wget -O $@ http://prdownloads.sourceforge.net/scintilla/$(SCINTILLA_SRC)?download
-
-$(SCINTERM_SRC):
- wget -O $@ http://foicica.com/scinterm/download/$(SCINTERM_SRC)
-
-all : $(SCITECO_SRC) bundle debian mingw-binary
-
-# Create source bundle
-bundle : sciteco-$(SCITECO_VERSION)-bundle.tar.gz
-sciteco-$(SCITECO_VERSION)-bundle.tar.gz : $(SCITECO_SRC) $(SCINTILLA_SRC) $(SCINTERM_SRC)
- mkdir sciteco-$(SCITECO_VERSION)/
- (cd sciteco-$(SCITECO_VERSION)/; \
- tar xzf ../$(SCITECO_SRC); \
- mv sciteco-$(SCITECO_VERSION) sciteco; \
- tar xzf ../$(SCINTILLA_SRC); \
- unzip -d scintilla/ ../$(SCINTERM_SRC); \
- mv scintilla/scinterm_$(SCINTERM_VERSION) scintilla/scinterm; \
- for patch in sciteco/patches/*.patch; do \
- patch --merge -p1 <$$patch; \
- done; \
- )
- tar czf $@ sciteco-$(SCITECO_VERSION)/
- rm -rf sciteco-$(SCITECO_VERSION)/
+all : $(SCITECO_SRC) debian mingw-binary
# $(UBUNTU) sets the Ubuntu distribution and fixes the package's
# version
@@ -43,7 +14,7 @@ debian-prepare: debian-temp/
debian-temp/ : bundle
mkdir debian-temp/
(cd debian-temp/; \
- cp ../sciteco-$(SCITECO_VERSION)-bundle.tar.gz \
+ cp ../$(SCITECO_SRC) \
sciteco_$(SCITECO_VERSION).orig.tar.gz; \
tar xzf sciteco_$(SCITECO_VERSION).orig.tar.gz; \
cp -r ../debian sciteco-$(SCITECO_VERSION)/; \
@@ -90,11 +61,9 @@ ppa : debian-source
)
mingw-binary : sciteco-$(SCITECO_VERSION)-win32.zip
-sciteco-$(SCITECO_VERSION)-win32.zip : bundle
- tar xzf sciteco-$(SCITECO_VERSION)-bundle.tar.gz
- $(MAKE) -C sciteco-$(SCITECO_VERSION)/scintilla/scinterm \
- CXX=i686-w64-mingw32-g++ AR=i686-w64-mingw32-ar
- (cd sciteco-$(SCITECO_VERSION)/sciteco; \
+sciteco-$(SCITECO_VERSION)-win32.zip : $(SCITECO_SRC)
+ tar xzf $(SCITECO_SRC)
+ (cd sciteco-$(SCITECO_VERSION); \
./configure --host=i686-w64-mingw32 --prefix=/ \
--with-interface=pdcurses \
--with-default-scitecopath=lib \
@@ -102,7 +71,7 @@ sciteco-$(SCITECO_VERSION)-win32.zip : bundle
--enable-html-manual \
CFLAGS="-g -O3" CXXFLAGS="-g -O3"; \
)
- $(MAKE) -C sciteco-$(SCITECO_VERSION)/sciteco \
+ $(MAKE) -C sciteco-$(SCITECO_VERSION) \
install DESTDIR=`pwd`/temp-install
rm -rf sciteco-$(SCITECO_VERSION)/
i686-w64-mingw32-strip -s temp-install/bin/*
@@ -118,7 +87,6 @@ sciteco-$(SCITECO_VERSION)-win32.zip : bundle
rm -rf temp-bin/
clean:
- rm -rf $(SCITECO_SRC) $(SCINTILLA_SRC) $(SCINTERM_SRC)
- rm -rf sciteco-$(SCITECO_VERSION)-bundle.tar.gz
+ rm -rf $(SCITECO_SRC)
rm -rf debian-temp/
rm -rf sciteco-$(SCITECO_VERSION)/
diff --git a/patches/050-scinterm-lexlib.patch b/patches/050-scinterm-lexlib.patch
deleted file mode 100644
index bdc3fd8..0000000
--- a/patches/050-scinterm-lexlib.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Link the entire lexlib into Scinterm's scintilla.a.
-The author forgot to add CharacterCategory.o.
---- a/scintilla/scinterm/Makefile 2014-02-16 06:44:03.572368461 +0100
-+++ b/scintilla/scinterm/Makefile 2014-02-16 06:47:07.495772994 +0100
-@@ -28,9 +28,9 @@
- Document.o Editor.o ExternalLexer.o Indicator.o KeyMap.o \
- LineMarker.o PerLine.o PositionCache.o RESearch.o RunStyles.o \
- ScintillaBase.o Selection.o Style.o UniConversion.o ViewStyle.o \
-- XPM.o Accessor.o CharacterSet.o LexerBase.o LexerModule.o \
-- LexerNoExceptions.o LexerSimple.o PropSetSimple.o StyleContext.o \
-- WordList.o $(lexers) ScintillaTerm.o
-+ XPM.o Accessor.o CharacterCategory.o CharacterSet.o LexerBase.o \
-+ LexerModule.o LexerNoExceptions.o LexerSimple.o PropSetSimple.o \
-+ StyleContext.o WordList.o $(lexers) ScintillaTerm.o
- $(AR) rc $@ $^
- touch $@
- clean:
diff --git a/patches/README b/patches/README
deleted file mode 100644
index 9ce62c8..0000000
--- a/patches/README
+++ /dev/null
@@ -1,3 +0,0 @@
-This directory contains Scintilla/Scinterm patches.
-Most of them are required for SciTECO to function properly.
-Please refer to INSTALL. \ No newline at end of file
diff --git a/scintilla b/scintilla
new file mode 160000
+Subproject 3743bcf846ed7dca8b704d095c1e8bf977e6e10
diff --git a/scintilla.am b/scintilla.am
new file mode 100644
index 0000000..0d408bd
--- /dev/null
+++ b/scintilla.am
@@ -0,0 +1,22 @@
+# Scintilla/Scinterm are cloned as submodules
+# of this repository, so we may give a rule
+# for building scintilla.a here
+
+if INTERFACE_GTK
+SCINTILLA_MAKE_DIR = @SCINTILLA_PATH@/gtk
+else
+SCINTILLA_MAKE_DIR = @SCINTERM_PATH@
+endif
+
+@SCINTILLA_PATH@/bin/scintilla.a :
+ $(MAKE) -C $(SCINTILLA_MAKE_DIR) \
+ CXX=@CXX@ AR=@AR@
+
+clean-local-scintilla:
+ $(MAKE) -C $(SCINTILLA_MAKE_DIR) clean
+
+# NOTE: using a separate `clean-local-scintilla`
+# target allows us to add more custom rules to the
+# including Automake file
+clean-local: clean-local-scintilla
+.PHONY: clean-local-scintilla
diff --git a/src/Makefile.am b/src/Makefile.am
index a4662bd..60b866e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,5 @@
include $(top_srcdir)/bootstrap.am
+include $(top_srcdir)/scintilla.am
AM_CFLAGS = -Wall -std=c99
AM_CXXFLAGS = -Wall -Wno-char-subscripts