Skip to content

Commit

Permalink
Initial import.
Browse files Browse the repository at this point in the history
svn path=/trunk/; revision=2
  • Loading branch information
Lucas Almeida Rocha committed Oct 10, 2008
0 parents commit c94cbf1
Show file tree
Hide file tree
Showing 73 changed files with 13,427 additions and 0 deletions.
Empty file added AUTHORS
Empty file.
19 changes: 19 additions & 0 deletions COPYING
@@ -0,0 +1,19 @@
Copyright (c) 2008 LiTL, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Empty file added ChangeLog
Empty file.
15 changes: 15 additions & 0 deletions MAINTAINERS
@@ -0,0 +1,15 @@
Havoc Pennington
E-mail: hp@pobox.com
Userid: hp

Johan Bilien
E-mail: jobi@via.ecp.fr
Userid: jobi

Lucas Rocha
E-mail: lucasr@gnome.org
Userid: lucasr

Tommi Komulainen
E-mail: tommi.komulainen@iki.fi
Userid: tko
3 changes: 3 additions & 0 deletions Makefile-examples.am
@@ -0,0 +1,3 @@
EXTRA_DIST += \
examples/clutter.js \
examples/gtk.js
40 changes: 40 additions & 0 deletions Makefile-gi.am
@@ -0,0 +1,40 @@
lib_LTLIBRARIES += \
libgjs-gi.la

libgjs_gi_la_CFLAGS = \
$(AM_CFLAGS) \
$(GJS_CFLAGS) \
$(GOBJECT_INTROSPECTION_CFLAGS)
libgjs_gi_la_LIBADD = \
$(GOBJECT_INTROSPECTION_LIBS) \
libgjs.la
libgjs_gi_la_LDFLAGS = \
-export-symbols-regex "^[^_].*" -version-info 0:0:0 -rdynamic

noinst_HEADERS += \
gi/arg.h \
gi/boxed.h \
gi/closure.h \
gi/enumeration.h \
gi/function.h \
gi/keep-alive.h \
gi/native.h \
gi/ns.h \
gi/object.h \
gi/param.h \
gi/repo.h \
gi/value.h

libgjs_gi_la_SOURCES = \
gi/arg.c \
gi/boxed.c \
gi/closure.c \
gi/enumeration.c \
gi/function.c \
gi/keep-alive.c \
gi/native.c \
gi/ns.c \
gi/object.c \
gi/param.c \
gi/repo.c \
gi/value.c
26 changes: 26 additions & 0 deletions Makefile-modules.am
@@ -0,0 +1,26 @@
dist_gjsjs_DATA += modules/lang.js

gjsnative_LTLIBRARIES += gi.la

JS_NATIVE_MODULE_CFLAGS = \
$(AM_CFLAGS) \
$(GJS_CFLAGS)
JS_NATIVE_MODULE_LIBADD = \
$(GJS_LIBS) \
libgjs.la
JS_NATIVE_MODULE_LDFLAGS = \
-module -avoid-version -Wl,-z,defs -rdynamic

gi_la_CFLAGS = \
$(JS_NATIVE_MODULE_CFLAGS) \
$(GOBJECT_INTROSPECTION_CFLAGS)
gi_la_LIBADD = \
libgjs-gi.la \
$(JS_NATIVE_MODULE_LIBADD) \
$(GOBJECT_INTROSPECTION_LIBS)
gi_la_LDFLAGS = \
$(JS_NATIVE_MODULE_LDFLAGS)

gi_la_SOURCES = \
modules/gi.h \
modules/gi.c
56 changes: 56 additions & 0 deletions Makefile-test.am
@@ -0,0 +1,56 @@
GTESTER = ${TESTS_ENVIRONMENT} gtester

########################################################################
TEST_PROGS += gjs-tests

gjs_tests_CFLAGS = \
-include $(top_srcdir)/test/test.h \
$(AM_CFLAGS) \
$(GJSTESTS_CFLAGS) \
$(gjs_directory_defines) \
-I$(top_srcdir)/test

## -rdynamic makes backtraces work
gjs_tests_LDFLAGS = -rdynamic
gjs_tests_LDADD = \
$(GJSTESTS_LIBS) \
libgjs.la

gjs_tests_SOURCES = \
test/gjs-tests.c \
test/test.h \
$(gjstest_files_with_tests)

nodist_gjs_tests_SOURCES = \
gjstest.c \
gjstest.h

## make-tests always updates the ".stamp" files, but only modifies the
## actual gjstest.[hc] if they change. make-tests creates both
## .h.stamp and .c.stamp but if we listed both, make would run
## make-tests twice.
gjstest.h.stamp : scripts/make-tests $(gjstest_files_with_tests)
$(TESTS_ENVIRONMENT) $(top_srcdir)/scripts/make-tests $(builddir) $(gjstest_files_with_tests)

gjstest.h gjstest.c : gjstest.h.stamp
@true

BUILT_SOURCES += $(nodist_gjs_tests_SOURCES)
CLEANFILES += \
$(nodist_gjs_tests_SOURCES) \
gjstest.c.stamp \
gjstest.h.stamp

EXTRA_DIST += \
scripts/make-tests

########################################################################
TESTS_ENVIRONMENT = \
abs_top_srcdir="$(abs_top_srcdir)" \
LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$(FIREFOX_JS_LIBDIR)"

test: ${TEST_PROGS}
@test -z "${TEST_PROGS}" || ${GTESTER} --verbose ${TEST_PROGS}

check: test

100 changes: 100 additions & 0 deletions Makefile.am
@@ -0,0 +1,100 @@
bin_PROGRAMS =
lib_LTLIBRARIES =
noinst_LTLIBRARIES =
dist_gjsjs_DATA =
gjsnative_LTLIBRARIES =
BUILT_SOURCES =
CLEANFILES =
EXTRA_DIST =
gjstest_files_with_tests =
TEST_PROGS =
check_PROGRAMS = $(TEST_PROGS)

gjsjsdir = @gjsjsdir@
gjsnativedir = @gjsnativedir@

gjsincludedir = $(includedir)/gjs-1.0

########################################################################
nobase_gjsinclude_HEADERS = \
gjs/context.h \
gjs/gjs.h \
gjs/jsapi-util.h \
gjs/native.h
noinst_HEADERS = \
gjs/context-jsapi.h \
gjs/importer.h \
gjs/mem.h \
util/dirs.h \
util/error.h \
util/glib.h \
util/log.h \
util/misc.h

########################################################################
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gjs-1.0.pc

EXTRA_DIST += \
gjs-1.0.pc.in

########################################################################
gjs_directory_defines = \
-DGJS_TOP_SRCDIR=\"$(abs_top_srcdir)\" \
-DGJS_BUILDDIR=\"$(abs_top_builddir)\" \
-DGJS_JS_DIR=\"$(gjsjsdir)\" \
-DGJS_NATIVE_DIR=\"$(gjsnativedir)\"

########################################################################
lib_LTLIBRARIES += libgjs.la

libgjs_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(gjs_directory_defines)
libgjs_la_CFLAGS = \
$(AM_CFLAGS) \
$(GJS_CFLAGS)
libgjs_la_LDFLAGS = \
-export-symbols-regex "^[^_]" -version-info 0:0:0 \
-R $(FIREFOX_JS_LIBDIR) -rdynamic
libgjs_la_LIBADD = \
$(GJS_LIBS)

libgjs_la_SOURCES = \
gjs/context.c \
gjs/importer.c \
gjs/jsapi-util.c \
gjs/jsapi-util-array.c \
gjs/jsapi-util-error.c \
gjs/jsapi-util-string.c \
gjs/mem.c \
gjs/native.c \
util/dirs.c \
util/error.c \
util/glib.c \
util/log.c \
util/misc.c

gjstest_files_with_tests += \
gjs/jsapi-util-array.c \
gjs/jsapi-util-error.c \
gjs/jsapi-util-string.c \
util/dirs.c \
util/glib.c

include Makefile-gi.am
include Makefile-modules.am
include Makefile-examples.am
########################################################################
bin_PROGRAMS += gjs-console

gjs_console_CFLAGS = \
$(AM_CFLAGS) \
$(GJS_CFLAGS)
gjs_console_LDADD = \
libgjs.la

gjs_console_SOURCES = gjs/console.c


include Makefile-test.am
Empty file added NEWS
Empty file.
Empty file added README
Empty file.
44 changes: 44 additions & 0 deletions autogen.sh
@@ -0,0 +1,44 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.

srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

PKG_NAME="gjs"
REQUIRED_AUTOCONF_VERSION=2.53
REQUIRED_AUTOMAKE_VERSION=1.7.2

(test -f $srcdir/configure.ac \
&& test -f $srcdir/autogen.sh) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}

DIE=0

# This is a bit complicated here since we can't use gnome-config yet.
# It'll be easier after switching to pkg-config since we can then
# use pkg-config to find the gnome-autogen.sh script.

gnome_autogen=
gnome_datadir=

ifs_save="$IFS"; IFS=":"
for dir in $PATH ; do
test -z "$dir" && dir=.
if test -f $dir/gnome-autogen.sh ; then
gnome_autogen="$dir/gnome-autogen.sh"
gnome_datadir=`echo $dir | sed -e 's,/bin$,/share,'`
break
fi
done
IFS="$ifs_save"

if test -z "$gnome_autogen" ; then
echo "You need to install the gnome-common module and make"
echo "sure the gnome-autogen.sh script is in your \$PATH."
exit 1
fi

GNOME_DATADIR="$gnome_datadir" USE_GNOME2_MACROS=1 . $gnome_autogen

0 comments on commit c94cbf1

Please sign in to comment.