Commit d6e99656 authored by kocienda's avatar kocienda

It's that time again: I have made a number of changes to the make system.

The two major modification are:

1. The tests directory, which was formerly buried in WebCore, has been moved to the top-level in Labyrinth, and is now a peer of WebCore and WebKit.

2. I have moved the the configure and Makefiles from WebCore one directory up so that they may serve for all of Labyrinth. In other words, running `configure` and `make` in Labyrinth now builds "everything," including WebCore, WebKit, and the test programs.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4d4ad86e
......@@ -35,7 +35,7 @@
# include make vars boilerplate
#
TOPSRCDIR = ../../..
TOPSRCDIR = ../../../..
include $(TOPSRCDIR)/Makefile.vars
#----------------------------------------------------------------------
......@@ -73,9 +73,13 @@ CXXOBJECTS = \
PROGRAM = testkjs
EXPORT_HEADERS = $(HEADERS)
OBJECTS = $(CXXOBJECTS)
EXPORT_OBJECTS = $(CXXOBJECTS)
EXPORT_OBJECTS_DIR = $(TOPSRCDIR)/lib/kjs
EXPORT_HEADERS_DIR = $(TOPSRCDIR)/WebCore/include/private
EXPORT_OBJECTS_DIR = $(TOPSRCDIR)/WebCore/lib
LIBRARY = libkjs.a
......@@ -96,7 +100,7 @@ YACCFLAGS = -d --output-file=grammar.cpp --name-prefix=kjsyy
#----------------------------------------------------------------------
# Set targets for this directory
all: $(CXXYACCOBJECTS) $(OBJECTS) $(LIBRARY) $(PROGRAM) export-objects
all: $(CXXYACCOBJECTS) $(OBJECTS) $(LIBRARY) $(PROGRAM) export-headers export-objects
$(LIBRARY): $(CXXOBJECTS)
$(AR) $(ARFLAGS) $(LIBRARY) $(CXXOBJECTS)
......
......@@ -10,7 +10,7 @@
#======================================================================
# Include header
TOPSRCDIR = .
TOPSRCDIR = ..
include $(TOPSRCDIR)/Makefile.vars
#----------------------------------------------------------------------
......@@ -29,17 +29,17 @@ SUBDIRS = \
src/kdelibs/khtml/rendering \
src/kdelibs/khtml \
src/kwq/ \
src/kwq/kde \
src/kwq/kdecore \
src/kwq/qt \
src/kwq/kde \
lib \
src/kwq/tests \
src/kwq/tests/qt \
$(NULL)
#----------------------------------------------------------------------
# Standard targets
all depend setup install clean distclean maintainer-clean:
all depend setup install clean distclean maintainer-clean:
@target=$@; \
list='$(SUBDIRS)'; \
for subdir in $$list; do \
......@@ -51,40 +51,8 @@ all depend setup install clean distclean maintainer-clean:
*) exit 1;; \
esac; \
done; \
echo ">>> Making local-$$target in `pwd`"; \
$(MAKE) local-$$target; \
$(NULL)
#----------------------------------------------------------------------
# Custom targets
test:
cd src/kwq/tests && \
$(MAKE) && \
./harness
local-all:
local-dep:
local-install:
local-setup:
local-depend:
local-clean:
local-distclean:
${MAKE} local-clean
rm -rf Makefile \
Makefile.rules \
Makefile.vars \
config.h \
config.cache \
config.log \
config.status \
$(NULL)
local-maintainer-clean:
rm -f configure;
${MAKE} local-distclean
#======================================================================
# end
#======================================================================
......
#======================================================================
#
# $RCSfile$
# $Revision$
# $Author$
# $Date$
#
# Make.rules boilerplate
#
#======================================================================
# Suffix rules
#
$(filter %.c,$(CLEXOBJECTS)): %.c: %.l
$(LEX) $(LEXFLAGS) $<
$(filter %.cpp,$(CXXLEXOBJECTS)): %.cpp: %.l
$(LEX) $(LEXFLAGS) $<
$(filter %.c,$(CYACCOBJECTS)): %.c: %.y
$(YACC) $(YACCFLAGS) $<
$(filter %.cpp,$(CXXYACCOBJECTS)): %.cpp: %.y
$(YACC) $(YACCFLAGS) $<
$(filter %.o,$(COBJECTS)): %.o: %.c
$(CC) $(CFLAGS) -I$(TOPSRCDIR) -c $< -o $@
$(filter %.o,$(CMMOBJECTS)): %.o: %.mm
$(CC) $(CFLAGS) -I$(TOPSRCDIR) -c $< -o $@
$(filter %.o,$(CMOBJECTS)): %.o: %.m
$(CC) $(CFLAGS) -I$(TOPSRCDIR) -c $< -o $@
$(filter %.o,$(CXXOBJECTS)): %.o: %.cpp
$(CXX) $(CXXFLAGS) -I$(TOPSRCDIR) -c $< -o $@
.SUFFIXES: .cpp .h .c .mm .m .p
.h.p:
$(CC) -precomp $(CCPRECOMPFLAGS) -I$(TOPSRCDIR) $*.h -o $*.p
.cpp.o:
$(CXX) $(CXXFLAGS) -I$(TOPSRCDIR) -c $< -o $@
.mm.o:
$(CC) $(CMMFLAGS) -I$(TOPSRCDIR) -c $< -o $@
.m.o:
$(CC) $(CMFLAGS) -I$(TOPSRCDIR) -c $< -o $@
#----------------------------------------------------------------------
# Standard subdir targets
export-objects: $(EXPORT_OBJECTS)
if [ ! -d "$(EXPORT_OBJECTS_DIR)" ]; then \
rm -f $(EXPORT_OBJECTS_DIR); \
mkdir -p $(EXPORT_OBJECTS_DIR); \
fi
for OBJECT in $?; do \
ln -f $$OBJECT $(EXPORT_OBJECTS_DIR)/$$OBJECT; \
done
touch $@
lib:
@$(MAKE)
if [ ! -d "$(TOPSRCDIR)/lib" ]; then \
rm -f $(EXPORT_OBJECTS_DIR); \
mkdir -p $(EXPORT_OBJECTS_DIR); \
fi
cd $(TOPSRCDIR)/lib; $(MAKE)
setup:
@if (test -f "./MakeSystemChanges.sh"); then \
./MakeSystemChanges.sh; \
fi
depend:
$(CC) -MM $(DEPFLAGS) $(SOURCES) > Makefile.dep
clean:
rm -rf ${CLEAN_FILES} core
distclean:
${MAKE} clean
rm -f Makefile \
config.h \
config.cache \
config.log \
config.status \
$(NULL)
maintainer-clean:
rm -f configure
${MAKE} distclean;
#----------------------------------------------------------------------
# include make dependency rules
-include Makefile.dep
#======================================================================
# end $RCSfile$
#======================================================================
dnl -------------------------------------------------------------------
dnl
dnl Local autoconf macros
dnl
dnl $RCSfile$
dnl $Revision$
dnl $Author$
dnl $Date$
dnl
dnl -------------------------------------------------------------------
dnl
dnl Sets the top directory for the build
dnl
dnl Usage: AC_PATH_SET_TOPSRCDIR(PROGRAM_NAME)
dnl
AC_DEFUN(AC_PATH_SET_TOPSRCDIR,
[AC_MSG_CHECKING([top directory])
ac_cv_path_TOPSRCDIR=`pwd`
AC_MSG_RESULT(ok)
])dnl
dnl
dnl
dnl -------------------------------------------------------------------
dnl
dnl Sets the top directory for the build
dnl
dnl Usage:
dnl
AC_DEFUN(AC_CHECK_ISSOCK, [
AC_MSG_CHECKING([whether sys/stat.h declares S_ISSOCK])
AC_TRY_COMPILE([#include <sys/stat.h>] ,[
#ifndef S_ISSOCK
#define S_ISSOCK no workie
#endif
void foo() {
int mode = S_ISSOCK(0);
}
], [
AC_DEFINE_UNQUOTED(HAVE_S_ISSOCK,1)
AC_MSG_RESULT([yes])
] , [
AC_MSG_RESULT([no])
])
])dnl
dnl
dnl -------------------------------------------------------------------
dnl
dnl#ifndef S_ISSOCK
dnl#define S_ISSOCK does not compile
dnl#endif
dnlint main() {
dnl int i = S_ISSOCK(0);
dnl return 0;
dnl}
KURL
QArray
QBuffer
QCollection
QColor
#QDateTime
QDict
QDir
QFile
QList
QMap
QPoint
QPtrDict
QRect
QRegExp
#QRegion
QSize
QSortedList
QStack
#QString
QStringList
QTextStream
QValueList
QVector
#!/bin/sh
# Script for handling errors encountered while configuring source code.
# Copyright (C) 2000 Webcodex, Inc.
# Webcodex, Inc.
# 840 C Street, #621
# San Rafael, CA 94901
# http://www.webcodex.com
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
case "$1" in
-h|--h|--he|--hel|--help)
echo "
This is 'config.err' - a script for handling configuration errors
Usage: $0 [OPTION]... ERR [ARGUMENT]...
Handle \`ERR [ARGUMENT]...' for ERR, or return an
error status if there is no known handling for ERR.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
Supported ERR values:
dir Not in a supported directory
cc No compiler for the C language
bison No GNU bison
flex No GNU flex
"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo 1>&2 "
This is 'config.err' - a script for handling configuration errors
\$RCSfile$
\$Revision$
\$Author$
\$Date$
"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
dir)
echo 1>&2 "
*** ERROR: This script must run in a directory that ends with this path:
\`$2'.
"
exit 1
;;
cc)
echo 1>&2 "
*** ERROR: Your system seems to be missing a C compiler. You will need to
install one before you can to build and install this program. Check with
the documentation for your system to see how best to acquire or locate a C
compiler.
"
exit 1
;;
flex|bison)
echo 1>&2 "
*** ERROR: \`$1' is missing on your system. You will need to install
\`$1' to compile this program. You can get the source code for this
program from any GNU archive site.
"
exit 1
;;
gperf)
echo 1>&2 "\
*** ERROR: \`$1' is missing on your system. It is required to build this
tree. To obtain gperf, run the install-gperf.sh script that
is available from cvs in the Labyrinth/Updates directory.
If you have further questions, contact Ken Kocienda <kocienda@apple.com>
"
exit 1
;;
*) echo 1>&2 "
*** ERROR: \`$1' is needed, and you do not seem to have it installed on
your system. You might have modified some files in a manner that is not
yet supported. Check the \`README' file. It tells you about the
requirements for compiling and installing this package. You may also
check at any GNU archive site, in case some other package might contain
this missing \`$1' program.
"
exit 1
;;
esac
exit 0
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
AC_INIT(Makefile.vars.in)
AC_CONFIG_HEADER(config.h)
dnl
dnl -------------------------------------------------------------------
dnl Set the package and version
dnl -------------------------------------------------------------------
dnl
WEBPAGEVIEW_MAJOR_VERSION=0
WEBPAGEVIEW_MINOR_VERSION=0
WEBPAGEVIEW_MICRO_VERSION=1
WEBPAGEVIEW_VERSION=$WEBPAGEVIEW_MAJOR_VERSION.$WEBPAGEVIEW_MINOR_VERSION.$WEBPAGEVIEW_MICRO_VERSION
VERSION=$WEBPAGEVIEW_VERSION
PACKAGE=WEBPAGEVIEW
AC_SUBST(WEBPAGEVIEW_MAJOR_VERSION)
AC_SUBST(WEBPAGEVIEW_MINOR_VERSION)
AC_SUBST(WEBPAGEVIEW_MICRO_VERSION)
AC_DEFINE_UNQUOTED(WEBPAGEVIEW_MAJOR_VERSION,$WEBPAGEVIEW_MAJOR_VERSION)
AC_DEFINE_UNQUOTED(WEBPAGEVIEW_MINOR_VERSION,$WEBPAGEVIEW_MINOR_VERSION)
AC_DEFINE_UNQUOTED(WEBPAGEVIEW_MICRO_VERSION,$WEBPAGEVIEW_MICRO_VERSION)
dnl
dnl -------------------------------------------------------------------
dnl Set configuration error script
dnl -------------------------------------------------------------------
dnl
CONFIG_ERR=`pwd`/config.err
dnl
dnl -------------------------------------------------------------------
dnl Check the host system configuration
dnl -------------------------------------------------------------------
dnl
AC_CANONICAL_HOST
case "$host" in
*macosx*) AC_DEFINE(MACOSX) ;;
esac
dnl
dnl -------------------------------------------------------------------
dnl Check for programs
dnl -------------------------------------------------------------------
dnl
AC_PROG_CC
if test -z "$ac_cv_prog_CC"; then
$CONFIG_ERR cc
exit 1
fi
AC_PROG_CXX
if test -z "$ac_cv_prog_CXX"; then
$CONFIG_ERR c++
exit 1
fi
CFLAGS="-DHAVE_CONFIG_H -g -fno-common"
AC_SUBST(CFLAGS)
CXXFLAGS="$CFLAGS -fno-coalesce-static-vtables"
AC_SUBST(CXXFLAGS)
DYLIBFLAGS="-dynamiclib"
AC_SUBST(DYLIBFLAGS)
AC_DECL_YYTEXT
AC_CHECK_PROGS(LEX, flex lex)
if test -z "$ac_cv_prog_LEX"; then
$CONFIG_ERR lex
exit 1
fi
LEXFLAGS="-I -d"
AC_SUBST(LEXFLAGS)
AC_CHECK_PROGS(YACC, bison)
if test "$ac_cv_prog_YACC" != "bison"; then
$CONFIG_ERR bison
exit 1
fi
YACCFLAGS="-d"
AC_SUBST(YACCFLAGS)
AC_CHECK_PROG(AR, ar, ar)
if test -z "$ac_cv_prog_AR"; then
$CONFIG_ERR ar
exit 1
fi
ARFLAGS="cr"
AC_SUBST(ARFLAGS)
AC_PROG_RANLIB
if test -z "$ac_cv_prog_RANLIB"; then
$CONFIG_ERR ranlib
exit 1
fi
AC_CHECK_PROGS(SED, sed)
if test -z "$ac_cv_prog_SED"; then
$CONFIG_ERR sed
exit 1
fi
AC_CHECK_PROG(GPERF, gperf, gperf)
if test -z "$ac_cv_prog_GPERF"; then
$CONFIG_ERR gperf
exit 1
fi
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_ARG_PROGRAM
dnl
dnl -------------------------------------------------------------------
dnl Checks for header files.
dnl -------------------------------------------------------------------
dnl
AC_HEADER_STAT
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(sys/param.h sys/mman.h sys/time.h sys/cdefs.h)
AC_CHECK_HEADERS(fnmatch.h sysent.h strings.h sys/stat.h sys/select.h)
AC_CHECK_HEADERS(sys/socket.h socketbits.h sigaction.h paths.h)
AC_CHECK_HEADERS(malloc.h limits.h dlfcn.h)
dnl
dnl -------------------------------------------------------------------
dnl Checks for libraries.
dnl -------------------------------------------------------------------
dnl
AC_CHECK_LIB(jpeg,jpeg_mem_init)
dnl
dnl -------------------------------------------------------------------
dnl Checks for typedefs, structures, and compiler characteristics.
dnl -------------------------------------------------------------------
dnl
AC_C_CONST
AC_C_INLINE
AC_HEADER_TIME
AC_CHECK_ISSOCK
dnl
dnl -------------------------------------------------------------------
dnl Checks for library functions.
dnl -------------------------------------------------------------------
dnl
AC_CHECK_FUNCS(socket vsnprintf seteuid setegid random strfmon stpcpy mkstemp gettimeofday setenv unsetenv mkstemps)
AC_LANG_SAVE
AC_LANG_C
AC_FUNC_VFORK
AC_CHECK_HEADERS(ieeefp.h float.h)
AC_CHECK_LIB(m, isinf, [
AC_DEFINE_UNQUOTED(HAVE_FUNC_ISINF, 1, [Define if you have isinf])
])
AC_CHECK_LIB(m, finite, [
AC_DEFINE_UNQUOTED(HAVE_FUNC_FINITE, 1, [Define if you have finite])
])
AC_CHECK_LIB(m, _finite, [
AC_DEFINE_UNQUOTED(HAVE_FUNC__FINITE, 1, [Define if you have _finite])
])
AC_CHECK_LIB(m, isnan, [
AC_DEFINE_UNQUOTED(HAVE_FUNC_ISNAN, 1, [Define if you have isnan])
])
dnl AC_CHECK_GETDOMAINNAME
dnl AC_CHECK_GETHOSTNAME
dnl AC_CHECK_RANDOM
dnl
dnl -------------------------------------------------------------------
dnl Special tweaks for our environment
dnl -------------------------------------------------------------------
dnl
dnl Define _KWQ_ to get hacks we've made to KDE/QT
AC_DEFINE_UNQUOTED(_KWQ_, 1)
AC_ARG_ENABLE(kwq-complete,
[ --enable-kwq-complete enables more complete Qt/KDE interfaces (default on)],
if ( test "$enableval" = "yes" ); then
AC_DEFINE_UNQUOTED(_KWQ_COMPLETE_, 1)
fi
,
AC_DEFINE_UNQUOTED(_KWQ_COMPLETE_, 1)
)
AC_ARG_ENABLE(kwq-pedantic,
[ --enable-kwq-pedantic enables pedantic declarations in KWQ code (default on)],
if ( test "$enableval" = "yes" ); then
AC_DEFINE_UNQUOTED(_KWQ_PEDANTIC_, 1)
fi
,
AC_DEFINE_UNQUOTED(_KWQ_PEDANTIC_, 1)
)
AC_ARG_ENABLE(kwq-iostream,
[ --enable-kwq-iostream enables iostream support for KWQ classes (default on)],
if ( test "$enableval" = "yes" ); then
AC_DEFINE_UNQUOTED(_KWQ_IOSTREAM_, 1)
fi
,
AC_DEFINE_UNQUOTED(_KWQ_IOSTREAM_, 1)
)
AC_ARG_ENABLE(qt-no-textstream,
[ --enable-qt-textstream enables Qt textstreams (default off)],
if ( test "$enableval" = "no" ); then
AC_DEFINE_UNQUOTED(QT_NO_TEXTSTREAM, 1)
fi
,
AC_DEFINE_UNQUOTED(QT_NO_TEXTSTREAM, 1)
)
AC_ARG_ENABLE(qt-no-datastream,
[ --enable-qt-datastream enables Qt datastreams (default off)],
if ( test "$enableval" = "no" ); then
AC_DEFINE_UNQUOTED(QT_NO_DATASTREAM, 1)
fi
,
AC_DEFINE_UNQUOTED(QT_NO_DATASTREAM, 1)
)
AC_ARG_ENABLE(qt-no-textcodec,
[ --enable-qt-textcodec enables Qt textcodecs (default off)],
if ( test "$enableval" = "no" ); then