1
0
Fork 0

Convert part of the build to the new build system

The root makefile is converted as well as some leaf Makefiles. This
also brings in the required infrastructure and adjusts configure.in
appropriately.

I converted only makefiles containing no configurable stuff, since
that'll require more consideration yet.
This commit is contained in:
Petr Baudis 2005-09-15 21:03:56 +02:00
parent 09c4185a44
commit 06ea255a22
25 changed files with 268 additions and 300 deletions

1
.gitignore vendored
View File

@ -8,6 +8,7 @@ config.status
configure
Makefile
Makefile.in
Makefile.config
stamp-h
stamp-h.in
depcomp

18
Makefile Normal file
View File

@ -0,0 +1,18 @@
-include Makefile.config
# This should be _really_ ., but only after we have src/Makefile.
# Otherwise, it wouldn't be set right in the submakefiles.
path_to_top = ..
# TODO: Automagically rerun autoconf.
SUBDIRS = doc po src
all: all-recursive
clean: clean-recursive
rm -rf features.log
install: install-recursive
-include Makefile.lib

View File

@ -1,25 +0,0 @@
## Process this file with automake to produce Makefile.in
## $Id: Makefile.am,v 1.49 2005/05/13 21:45:27 rrowan Exp $
SUBDIRS = Unicode config contrib debian doc intl po src test
EXTRA_DIST = \
ABOUT-NLS \
BUGS \
Makefile.base \
SITES \
TODO \
autogen.sh \
features.conf
install-exec-hook:
@if grep 'Lua' features.log > /dev/null; then \
echo "**************************************************************"; \
echo "Lua 4 support in ELinks is obsolete. If you are upgrading"; \
echo "from ELinks <= 0.10.X, you must update $(CONFDIR)/hooks.lua."; \
echo "**************************************************************"; \
fi
CLEANFILES = $(srcdir)/features.log
MAINTAINERCLEANFILES = $(srcdir)/acinclude.m4

105
Makefile.config.in Normal file
View File

@ -0,0 +1,105 @@
# This is the automake's playground of our cool build system.
# $Id$
#
# TODO: Make part of it autogenerated based on AC_SUBST() or something.
SHELL = @SHELL@
top_srcdir = $(path_to_top)/@top_srcdir@
top_builddir = $(path_to_top)
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
DESTDIR =
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
ASCIIDOC = @ASCIIDOC@
AWK = @AWK@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CONFDIR = @CONFDIR@
CONFIG_ASCIIDOC = @CONFIG_ASCIIDOC@
CONFIG_JW = @CONFIG_JW@
CONFIG_NLS = @CONFIG_NLS@
CONFIG_POD2HTML = @CONFIG_POD2HTML@
CONFIG_RUBY = @CONFIG_RUBY@
CONFIG_XMLTO = @CONFIG_XMLTO@
DATADIRNAME = @DATADIRNAME@
GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
GUILE_CFLAGS = @GUILE_CFLAGS@
GUILE_CONFIG = @GUILE_CONFIG@
HAVE_LIB = @HAVE_LIB@
HAVE_SMBCLIENT = @HAVE_SMBCLIENT@
INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
JW = @JW@
LIB = @LIB@
LIBDIR = @LIBDIR@
LIBGNUTLS_CONFIG = @LIBGNUTLS_CONFIG@
LOCALEDIR = @LOCALEDIR@
LTLIB = @LTLIB@
LUA_CFLAGS = @LUA_CFLAGS@
LUA_LIBS = @LUA_LIBS@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
PACKAGE = @PACKAGE@
PERL_CFLAGS = @PERL_CFLAGS@
PERL_LIBS = @PERL_LIBS@
POD2HTML = @POD2HTML@
POFILES = @POFILES@
POSUB = @POSUB@
PYTHON_CFLAGS = @PYTHON_CFLAGS@
PYTHON_LIBS = @PYTHON_LIBS@
RANLIB = @RANLIB@
RUBY_CFLAGS = @RUBY_CFLAGS@
RUBY_LIBS = @RUBY_LIBS@
SPIDERMONKEY_CFLAGS = @SPIDERMONKEY_CFLAGS@
SPIDERMONKEY_LIBS = @SPIDERMONKEY_LIBS@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
VERSION = @VERSION@
XMLTO = @XMLTO@
X_CFLAGS = @X_CFLAGS@
DEFS = @DEFS@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
INCLUDES = -I$(top_builddir) -I$(top_srcdir)/src
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)

72
Makefile.lib Normal file
View File

@ -0,0 +1,72 @@
### The build commands and verbosity
# If we are verbose, we will show commands prefixed by $(Q) (which acts as
# @ in the non-verbose mode), and we will show the "real" cmds instead of
# their quiet versions (which are used in the non-verbose mode).
# Inspired by the Linux kernel build system.
ifdef V
Q =
quiet =
mquiet = masq_
else
Q = @
quiet = quiet_
mquiet = quiet_
endif
# Show the command (quiet or non-quiet version based on the assignment
# just above) and then execute it.
ncmd = $(if $($(quiet)cmd_$(1)),echo $($(quiet)cmd_$(1)) &&) $(cmd_$(1))
cmd = @$(if $($(quiet)cmd_$(1)),echo $($(quiet)cmd_$(1)) &&) $(cmd_$(1))
mcmd = @$(if $($(mquiet)cmd_$(1)),echo $($(mquiet)cmd_$(1)) &&) $(cmd_$(1))
quiet_cmd_compile = '[CC] $<'
masq_cmd_compile = $(COMPILE) -c $<
cmd_compile = $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
quiet_cmd_archive = '[AR] $@'
cmd_archive = $(AR) r $@ $^
quiet_cmd_link = '[LINK] $@'
cmd_link = $(CC) $(LDFLAGS) -o $@ $^
# Recursive make
quiet_cmd_recmake = "[MAKE $$target] $$subdir"
cmd_recmake = $(MAKE) -C $$subdir $$target path_to_top="$(path_to_top)/.."
### Internal build rules
DEP_FILES_1 = $(foreach src,$(OBJS),.deps/$(src))
DEP_FILES = $(DEP_FILES_1:%.o=%.P)
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
ifdef $(OBJS)
-include $(DEP_FILES)
endif
%.o: %.c
$(call mcmd,compile)
@-cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
rm .deps/$(*F).pp
%.a:
$(call cmd,archive)
# Recursion:
.PHONY: all-recursive install-recursive clean-recursive
all-recursive install-recursive clean-recursive:
@target=`echo $@ | sed s/-recursive//`; \
for subdir in $(SUBDIRS); do \
$(call ncmd,recmake) || exit 1; \
done
# vim:syntax=make

View File

@ -1,51 +0,0 @@
## Process this file with automake to produce Makefile.in
## $Id: Makefile.am,v 1.3 2004/08/15 05:51:12 miciah Exp $
include $(top_srcdir)/Makefile.base
EXTRA_DIST = \
7bit.cp \
7bitrepl.lnx \
8859_1.cp \
8859_10.cp \
8859_13.cp \
8859_14.cp \
8859_15.cp \
8859_16.cp \
8859_2.cp \
8859_3.cp \
8859_4.cp \
8859_5.cp \
8859_6.cp \
8859_7.cp \
8859_8.cp \
8859_9.cp \
README \
cp1125.cp \
cp1250.cp \
cp1251.cp \
cp1252.cp \
cp1256.cp \
cp1257.cp \
cp437.cp \
cp737.cp \
cp850.cp \
cp852.cp \
cp866.cp \
entities.lnx \
gen \
gen-7b \
gen-cp \
gen-ent \
index.txt \
kamen.cp \
koi8_r.cp \
koi8_ru.cp \
koi8_u.cp \
mac_lat2.cp \
macroman.cp \
tcvn5712.cp \
tr7bit.awk \
utf_8.cp \
viscii.cp

View File

@ -1,4 +0,0 @@
## Process this file with automake to produce Makefile.in
## $Id: Makefile.am,v 1.1 2005/01/08 21:23:01 jonas Exp $
EXTRA_DIST = m4/*.m4

View File

@ -1262,27 +1262,20 @@ dnl Generated files
dnl ===================================================================
AC_OUTPUT([ \
Makefile \
Unicode/Makefile \
config/Makefile \
contrib/Makefile \
Makefile.config \
contrib/elinks.spec \
contrib/lua/hooks.lua \
contrib/conv/w3m2links.awk \
debian/Makefile \
doc/Makefile \
doc/man/Makefile \
doc/man/man1/Makefile \
doc/man/man1/elinks.1 \
doc/man/man5/Makefile \
intl/Makefile \
po/Makefile \
src/Makefile \
src/bfu/Makefile \
src/bookmarks/Makefile \
src/bookmarks/backend/Makefile \
src/cache/Makefile \
src/config/Makefile \
src/cookies/Makefile \
src/dialogs/Makefile \
src/document/Makefile \
@ -1293,11 +1286,7 @@ AC_OUTPUT([ \
src/document/plain/Makefile \
src/document/sgml/Makefile \
src/document/sgml/html/Makefile \
src/ecmascript/Makefile \
src/ecmascript/spidermonkey/Makefile \
src/encoding/Makefile \
src/formhist/Makefile \
src/globhist/Makefile \
src/intl/Makefile \
src/intl/gettext/Makefile \
src/intl/gettext/ref-add.sed \
@ -1335,8 +1324,7 @@ AC_OUTPUT([ \
src/util/Makefile \
src/viewer/Makefile \
src/viewer/dump/Makefile \
src/viewer/text/Makefile \
test/Makefile
src/viewer/text/Makefile
])

View File

@ -1,42 +0,0 @@
## Process this file with automake to produce Makefile.in
## $Id: Makefile.am,v 1.19 2005/06/03 02:18:43 jonas Exp $
include $(top_srcdir)/Makefile.base
EXTRA_DIST = \
LinksOS2Icon.zip \
README \
colws.diff \
elinks.conf \
elinks-vim.diff \
elinks.fortune \
elinks.spec.in \
elinks.vim \
js-1.5-rc6a+elinks.patch \
keybind-full.conf \
keybind.conf \
links_wps.zip \
wipe-out-ssl \
wipe-out-ssl.awk \
user.css \
TIPS-AND-TRICKS \
conv/conf-links2elinks.pl \
conv/mailcap.pl \
conv/old_to_new_bookmarks.sh \
conv/w3m2links.awk \
conv/w3m2links.awk.in \
guile/internal-hooks.scm \
guile/user-hooks.scm \
lua/babelfish.lua \
lua/bm-to-elinks-bookmarks.lua \
lua/bm.lua \
lua/config.lua \
lua/elinks-remote \
lua/highlight.lua \
lua/hooks.lua.in \
lua/md5check.lua \
lua/remote.lua \
perl/hooks.pl \
perl/config.pl \
python/hooks.py \
ruby/hooks.rb

19
debian/Makefile.am vendored
View File

@ -1,19 +0,0 @@
## Process this file with automake to produce Makefile.in
## $Id: Makefile.am,v 1.5 2005/02/22 14:39:03 jonas Exp $
EXTRA_DIST = \
README.Debian \
changelog \
control \
control.in \
copyright \
elinks.desktop \
elinks.docs \
elinks.postinst \
elinks.preinst \
elinks.prerm \
menu \
mime \
rules
DISTCLEANFILES = build-stamp elinks

View File

@ -1,4 +0,0 @@
## Process this file with automake to produce Makefile.in
## $Id: Makefile.am,v 1.4 2003/01/04 01:06:59 pasky Exp $
EXTRA_DIST = README

12
src/cache/Makefile.am vendored
View File

@ -1,12 +0,0 @@
## Process this file with automake to produce Makefile.in
## $Id: Makefile.am,v 1.2 2003/11/17 17:58:57 pasky Exp $
include $(top_srcdir)/Makefile.base
noinst_LIBRARIES = libcache.a
libcache_a_SOURCES = \
cache.c \
cache.h \
dialogs.c \
dialogs.h

11
src/config/Makefile Normal file
View File

@ -0,0 +1,11 @@
-include ../../Makefile.config
OBJS = cmdline.o conf.o dialogs.o home.o kbdbind.o options.o opttypes.o timer.o urlhist.o
all: libconfig.a
libconfig.a: $(OBJS)
clean:
rm -f *.o *.a
-include ../../Makefile.lib

View File

@ -1,29 +0,0 @@
## Process this file with automake to produce Makefile.in
## $Id: Makefile.am,v 1.17 2005/06/12 18:31:42 jonas Exp $
include $(top_srcdir)/Makefile.base
noinst_LIBRARIES = libconfig.a
libconfig_a_SOURCES = \
actions-edit.inc \
actions-main.inc \
actions-menu.inc \
cmdline.c \
cmdline.h \
conf.c \
conf.h \
dialogs.c \
dialogs.h \
home.c \
home.h \
kbdbind.c \
kbdbind.h \
options.c \
options.h \
options.inc \
opttypes.c \
opttypes.h \
timer.c \
timer.h \
urlhist.c \
urlhist.h

14
src/ecmascript/Makefile Normal file
View File

@ -0,0 +1,14 @@
-include ../../Makefile.config
INCLUDES += $(SPIDERMONKEY_CFLAGS)
SUBDIRS = spidermonkey
SM_OBJS = document.o form.o location.o navigator.o unibar.o window.o
OBJS = ecmascript.o spidermonkey.o $(foreach obj,$(SM_OBJS),spidermonkey/$(obj))
all: all-recursive libecmascript.a
libecmascript.a: $(OBJS)
clean:
rm -f *.o *.a
-include ../../Makefile.lib

View File

@ -1,22 +0,0 @@
## Process this file with automake to produce Makefile.in
## $Id: Makefile.am,v 1.10 2005/09/14 22:57:16 pasky Exp $
include $(top_srcdir)/Makefile.base
SUBDIRS=spidermonkey
INCLUDES += $(SPIDERMONKEY_CFLAGS)
noinst_LIBRARIES = libecmascript.a
libecmascript_a_LIBADD = \
spidermonkey/document.o \
spidermonkey/form.o \
spidermonkey/location.o \
spidermonkey/navigator.o \
spidermonkey/unibar.o \
spidermonkey/window.o
libecmascript_a_SOURCES = \
ecmascript.c \
ecmascript.h \
spidermonkey.c \
spidermonkey.h

View File

@ -0,0 +1,12 @@
-include ../../../Makefile.config
INCLUDES += $(SPIDERMONKEY_CFLAGS)
# Do not forget to also add the .o to ../Makefile. Yes, it sucks.
OBJS = document.o form.o location.o navigator.o unibar.o window.o
all: $(OBJS)
clean:
rm -f *.o *.a
-include ../../../Makefile.lib

View File

@ -1,30 +0,0 @@
## Process this file with automake to produce Makefile.in
## $Id: Makefile.am,v 1.6 2005/09/14 22:57:17 pasky Exp $
include $(top_srcdir)/Makefile.base
INCLUDES += $(SPIDERMONKEY_CFLAGS)
# We don't want to expose this outside of /src/ecmascript/ at all, and we can't
# merge the whole library of these with libecmascript.a. So we only compile
# objects here and link them directly to libecmascript.a in ../Makefile.am.
# However, we apparently need to create the library in order to convince
# automake to compile the objects :/. We DON'T use libbackend.a ANYWHERE.
noinst_LIBRARIES = libbackend.a
libbackend_a_SOURCES = \
document.c \
document.h \
form.c \
form.h \
location.c \
location.h \
navigator.c \
navigator.h \
util.h \
unibar.c \
unibar.h \
window.c \
window.h

11
src/formhist/Makefile Normal file
View File

@ -0,0 +1,11 @@
-include ../../Makefile.config
OBJS = formhist.o dialogs.o
all: libformhist.a
libformhist.a: $(OBJS)
clean:
rm -f *.o *.a
-include ../../Makefile.lib

View File

@ -1,12 +0,0 @@
## Process this file with automake to produce Makefile.in
## $Id: Makefile.am,v 1.3 2004/02/05 16:46:25 zas Exp $
include $(top_srcdir)/Makefile.base
noinst_LIBRARIES = libformhist.a
libformhist_a_SOURCES = \
dialogs.c \
dialogs.h \
formhist.c \
formhist.h

11
src/globhist/Makefile Normal file
View File

@ -0,0 +1,11 @@
-include ../../Makefile.config
OBJS = globhist.o dialogs.o
all: libglobhist.a
libglobhist.a: $(OBJS)
clean:
rm -f *.o *.a
-include ../../Makefile.lib

View File

@ -1,12 +0,0 @@
## Process this file with automake to produce Makefile.in
## $Id: Makefile.am,v 1.1 2002/08/29 23:58:23 pasky Exp $
include $(top_srcdir)/Makefile.base
noinst_LIBRARIES = libglobhist.a
libglobhist_a_SOURCES = \
dialogs.c \
dialogs.h \
globhist.c \
globhist.h

11
src/session/Makefile Normal file
View File

@ -0,0 +1,11 @@
-include ../../Makefile.config
OBJS = download.o history.o location.o session.o task.o
all: libsession.a
libsession.a: $(OBJS)
clean:
rm -f *.o *.a
-include ../../Makefile.lib

View File

@ -1,18 +0,0 @@
## Process this file with automake to produce Makefile.in
## $Id: Makefile.am,v 1.18 2005/06/14 12:25:21 jonas Exp $
include $(top_srcdir)/Makefile.base
noinst_LIBRARIES = libsession.a
libsession_a_SOURCES = \
download.c \
download.h \
history.c \
history.h \
location.c \
location.h \
session.c \
session.h \
task.c \
task.h

View File

@ -1,6 +0,0 @@
## Process this file with automake to produce Makefile.in
## $Id: Makefile.am,v 1.7 2004/12/18 00:11:06 miciah Exp $
include $(top_srcdir)/Makefile.base
EXTRA_DIST = README *.html *.htm *.txt css/*.html ecmascript/*.html