Commit bd8d9bdc authored by Jeremy Bicha's avatar Jeremy Bicha

New upstream version 1.50.2

parents 7969b369 9a97b89a
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.
The following files contain code from Mozilla which
is triple licensed under MPL1.1/LGPLv2+/GPLv2+:
The console module (modules/console.c)
Stack printer (gjs/stack.c)
This diff is collapsed.
This diff is collapsed.
EXTRA_DIST += \
examples/clutter.js \
examples/gio-cat.js \
examples/gtk.js \
examples/http-server.js \
examples/test.jpg
EXTRA_DIST += \
installed-tests/minijasmine.test.in \
installed-tests/script.test.in \
installed-tests/js/jsunit.gresources.xml \
$(NULL)
gjsinsttestdir = $(pkglibexecdir)/installed-tests
installedtestmetadir = $(datadir)/installed-tests/gjs
jstestsdir = $(gjsinsttestdir)/js
jsscripttestsdir = $(gjsinsttestdir)/scripts
gjsinsttest_PROGRAMS =
gjsinsttest_DATA =
installedtestmeta_DATA =
jstests_DATA =
jsscripttests_DATA =
pkglib_LTLIBRARIES =
if BUILDOPT_INSTALL_TESTS
gjsinsttest_PROGRAMS += minijasmine
gjsinsttest_DATA += $(TEST_INTROSPECTION_TYPELIBS)
installedtestmeta_DATA += \
$(jasmine_tests:.js=.test) \
$(simple_tests:%=%.test) \
$(NULL)
jstests_DATA += $(jasmine_tests)
jsscripttests_DATA += $(simple_tests)
pkglib_LTLIBRARIES += libregress.la libwarnlib.la libgimarshallingtests.la
%.test: %.js installed-tests/minijasmine.test.in Makefile
$(AM_V_GEN)$(MKDIR_P) $(@D) && \
$(SED) -e s,@pkglibexecdir\@,$(pkglibexecdir),g \
-e s,@name\@,$(notdir $<), \
< $(srcdir)/installed-tests/minijasmine.test.in > $@.tmp && \
mv $@.tmp $@
%.test: % installed-tests/script.test.in Makefile
$(AM_V_GEN)$(MKDIR_P) $(@D) && \
$(SED) -e s,@pkglibexecdir\@,$(pkglibexecdir), \
-e s,@name\@,$(notdir $<), \
< $(srcdir)/installed-tests/script.test.in > $@.tmp && \
mv $@.tmp $@
endif BUILDOPT_INSTALL_TESTS
NATIVE_MODULES = libconsole.la libsystem.la libmodules_resources.la
if ENABLE_CAIRO
NATIVE_MODULES += libcairoNative.la
endif
noinst_LTLIBRARIES += $(NATIVE_MODULES)
libgjs_la_LIBADD += $(NATIVE_MODULES)
JS_NATIVE_MODULE_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DGJS_COMPILATION \
$(GJS_CFLAGS)
JS_NATIVE_MODULE_LIBADD = \
$(GJS_LIBS)
modules_resource_files := $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/modules/modules.gresource.xml)
modules-resources.h: $(srcdir)/modules/modules.gresource.xml $(modules_resource_files)
$(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --sourcedir=$(builddir) --generate --c-name modules_resources $<
modules-resources.c: $(srcdir)/modules/modules.gresource.xml $(modules_resource_files)
$(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --sourcedir=$(builddir) --generate --c-name modules_resources $<
EXTRA_DIST += $(modules_resource_files) $(srcdir)/modules/modules.gresource.xml
include gjs-modules-srcs.mk
nodist_libmodules_resources_la_SOURCES = $(module_resource_srcs)
CLEANFILES += $(nodist_libmodules_resources_la_SOURCES)
libmodules_resources_la_CPPFLAGS = $(JS_NATIVE_MODULE_CPPFLAGS)
libmodules_resources_la_LIBADD = $(JS_NATIVE_MODULE_LIBADD)
libcairoNative_la_CPPFLAGS = $(JS_NATIVE_MODULE_CPPFLAGS) $(GJS_CAIRO_CFLAGS) $(GJS_CAIRO_XLIB_CFLAGS)
libcairoNative_la_LIBADD = $(JS_NATIVE_MODULE_LIBADD) $(GJS_CAIRO_LIBS) $(GJS_CAIRO_XLIB_LIBS)
libcairoNative_la_SOURCES = $(module_cairo_srcs)
libsystem_la_CPPFLAGS = $(JS_NATIVE_MODULE_CPPFLAGS)
libsystem_la_LIBADD = $(JS_NATIVE_MODULE_LIBADD)
libsystem_la_SOURCES = $(module_system_srcs)
libconsole_la_CPPFLAGS = $(JS_NATIVE_MODULE_CPPFLAGS)
libconsole_la_LIBADD = $(JS_NATIVE_MODULE_LIBADD) $(READLINE_LIBS)
libconsole_la_SOURCES = $(module_console_srcs)
This diff is collapsed.
# http://people.gnome.org/~walters/docs/build-api.txt
.buildapi-allow-builddir:
-include $(INTROSPECTION_MAKEFILE)
bin_PROGRAMS =
lib_LTLIBRARIES =
noinst_HEADERS =
noinst_LTLIBRARIES =
noinst_DATA =
dist_gjsjs_DATA =
BUILT_SOURCES =
CLEANFILES =
EXTRA_DIST =
check_PROGRAMS =
check_LTLIBRARIES =
INTROSPECTION_GIRS =
## ACLOCAL_AMFLAGS can be removed for Automake 1.13
ACLOCAL_AMFLAGS = -I m4
AM_CXXFLAGS = $(WARN_CXXFLAGS) $(CODE_COVERAGE_CFLAGS)
AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Gjs\" $(CODE_COVERAGE_CPPFLAGS)
AM_LDFLAGS = $(WARN_LDFLAGS) $(CODE_COVERAGE_LDFLAGS)
MAINTAINERCLEANFILES = \
$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
$(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \
$(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL) \
tap-driver.sh \
$(NULL)
GITIGNOREFILES = INSTALL m4
gjsjsdir = @gjsjsdir@
gjsoverridedir = $(gjsjsdir)/overrides
gjs_public_includedir = $(includedir)/gjs-1.0
########################################################################
include gjs-srcs.mk
########################################################################
nobase_gjs_public_include_HEADERS = $(gjs_public_headers)
########################################################################
pkgconfig_DATA = gjs-1.0.pc
EXTRA_DIST += gjs-1.0.pc.in
########################################################################
gjs_directory_defines = \
-DGJS_TOP_SRCDIR=\"$(top_srcdir)\" \
-DGJS_TOP_BUILDDIR=\"$(top_builddir)\" \
-DGJS_JS_DIR=\"$(gjsjsdir)\" \
-DPKGLIBDIR=\"$(pkglibdir)\"
########################################################################
lib_LTLIBRARIES += libgjs.la
libgjs_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(GJS_CFLAGS) \
$(gjs_directory_defines)\
-I$(top_srcdir)/gi \
-DGJS_COMPILATION
libgjs_la_LDFLAGS = \
-export-symbols-regex "^[^_]" \
-version-info 0:0:0 \
$(NO_UNDEFINED_FLAG) \
$(NULL)
libgjs_la_LIBADD = \
$(GJS_LIBS)
if ENABLE_GTK
libgjs_la_CPPFLAGS += $(GJS_GTK_CFLAGS)
libgjs_la_LIBADD += $(GJS_GTK_LIBS)
endif
# Please see gjs-srcs.mk for brief expanations
# of the layout of the sources due to historical
# reasons
libgjs_la_SOURCES = $(gjs_srcs)
# Also, these files used to be a separate library
libgjs_private_source_files = $(gjs_private_srcs)
if ENABLE_GTK
libgjs_private_source_files += $(gjs_gtk_private_srcs)
endif
libgjs_la_SOURCES += $(libgjs_private_source_files)
GjsPrivate-1.0.gir: libgjs.la
GjsPrivate_1_0_gir_LIBS = libgjs.la
GjsPrivate_1_0_gir_INCLUDES = GObject-2.0 Gio-2.0
GjsPrivate_1_0_gir_CFLAGS = -I$(top_srcdir)
GjsPrivate_1_0_gir_FILES = $(libgjs_private_source_files)
GjsPrivate_1_0_gir_SCANNERFLAGS = \
--identifier-prefix=Gjs \
--symbol-prefix=gjs_ \
--warn-all \
$(WARN_SCANNERFLAGS) \
$(NULL)
if ENABLE_GTK
GjsPrivate_1_0_gir_INCLUDES += Gtk-3.0
endif
INTROSPECTION_GIRS += GjsPrivate-1.0.gir
if ENABLE_DTRACE
gjs_gi_probes.h: gi/gjs_gi_probes.d
$(DTRACE) -C -h -s $< -o $@
gjs_gi_probes.o: gi/gjs_gi_probes.d
$(DTRACE) -G -s $< -o $@
BUILT_SOURCES += gjs_gi_probes.h gjs_gi_probes.o
libgjs_la_LIBADD += gjs_gi_probes.o
endif
EXTRA_DIST += gi/gjs_gi_probes.d
tapset_in_files = gjs/gjs.stp.in
EXTRA_DIST += $(tapset_in_files)
if ENABLE_SYSTEMTAP
gjs/gjs.stp: gjs/gjs.stp.in Makefile
$(AM_V_GEN)$(MKDIR_P) $(@D) && \
$(SED) -e s,@EXPANDED_LIBDIR@,$(libdir), < $< > $@.tmp && mv $@.tmp $@
tapsetdir = $(datadir)/systemtap/tapset
tapset_DATA = $(tapset_in_files:.stp.in=.stp)
endif
include Makefile-modules.am
include Makefile-examples.am
typelibdir = $(pkglibdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(INTROSPECTION_GIRS) $(typelib_DATA)
########################################################################
bin_PROGRAMS += gjs-console
gjs_console_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(GJS_CONSOLE_CFLAGS) \
$(NULL)
gjs_console_LDADD = \
$(GJS_CONSOLE_LIBS) \
libgjs.la
gjs_console_LDFLAGS = -rdynamic
gjs_console_SOURCES = $(gjs_console_srcs)
install-exec-hook:
(cd $(DESTDIR)$(bindir) && $(LN_S) -f gjs-console$(EXEEXT) gjs$(EXEEXT))
include Makefile-test.am
include Makefile-insttest.am
EXTRA_DIST += \
autogen.sh \
COPYING.LGPL \
doc/ByteArray.md \
doc/cairo.md \
doc/Hacking.md \
doc/SpiderMonkey_Memory.md \
doc/Style_Guide.md \
win32/build-rules-msvc.mak \
win32/config-msvc.mak \
win32/config.h.win32 \
win32/create-lists-msvc.mak \
win32/create-lists.bat \
win32/detectenv-msvc.mak \
win32/generate-msvc.mak \
win32/gjs-introspection-msvc.mak \
win32/info-msvc.mak \
win32/install.mak \
win32/introspection-msvc.mak \
win32/Makefile.vc \
win32/README.txt \
$(NULL)
# Colin's handy Makefile bits for:
# 1) stuffing tarballs with pre-generated scripts from your workstation
# 2) bumping configure.ac version post-release
# 3) tagging correctly in git
# 4) uploading to gnome.org
# To use:
# $ make check
# $ make dist
# $ make prepare-minor-release
# Customize to taste
TAG_PREFIX=GJS_
COMPRESSION=.bz2
PACKAGE=@PACKAGE@
VERSION=@VERSION@
DISTNAME=$(PACKAGE)-$(VERSION).tar$(COMPRESSION)
TAG_VERSION := $(shell echo $(VERSION) | $(SED) s/\\\./_/g)
prepare-release-tag: Makefile
git tag -m "Tag $(TAG_VERSION)" -a $(TAG_PREFIX)$(TAG_VERSION)
prepare-minor-release: $(DISTNAME) prepare-release-tag Makefile
env top_srcdir=$(top_srcdir) python $(top_srcdir)/verbump.py
upload-release: $(DISTNAME) Makefile
git log origin/master..master
@echo -n "Ok to push? [y/N] "; read ans; test x$$ans == xy || exit 1
git push --tags origin master:master
scp $(DISTNAME) master.gnome.org:
ssh master.gnome.org install-module $(DISTNAME)
CPPCHECK=cppcheck
### cppcheck static code analysis
#
cppcheck:
$(CPPCHECK) --enable=warning,performance,portability,information,missingInclude --force -q $(top_srcdir) -I $(top_builddir)
-include $(top_srcdir)/git.mk
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
JavaScript bindings for GNOME
=============================
Available as part of your GNOME distribution. Powers GNOME Shell, Polari,
GNOME Documents, and many other apps.
Wiki: https://wiki.gnome.org/action/show/Projects/Gjs
How to build and run if you want to contribute to GJS: see doc/Hacking.md
This diff is collapsed.
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
test -n "$srcdir" || srcdir=`dirname "$0"`
test -z "$srcdir" && srcdir=.
olddir=`pwd`
cd "$srcdir"
(test -f configure.ac) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level directory"
exit 1
}
if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
echo "*** WARNING: I am going to run 'configure' with no arguments." >&2
echo "*** If you wish to pass any to it, please specify them on the" >&2
echo "*** '$0' command line." >&2
echo "" >&2
fi
aclocal --install || exit 1 # autoreconf will do this automatically in future
autoreconf --verbose --force --install || exit 1
cd "$olddir"
if [ "$NOCONFIGURE" = "" ]; then
"$srcdir/configure" "$@" || exit 1
if [ "$1" = "--help" ]; then exit 0 else
echo "Now type 'make' to compile" || exit 1
fi
else
echo "Skipping configure process."
fi
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.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, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.