Skip to content
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ACLOCAL_AMFLAGS = -I m4

SUBDIRS = sources sources/glue doc

pkgconfigdir = $(libdir)/pkgconfig
Expand Down
39 changes: 20 additions & 19 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ASSEMBLY_PC="webkitgtk-sharp-3.0"
ASSEMBLY_SHORTNAME="webkitgtk"
ASSEMBLY_TITLE="WebKit#"
ASSEMBLY_VERSION="2.0.0"
AC_SUBST([ACLOCAL_AMFLAGS], ["-I m4 \${ACLOCAL_FLAGS}"])
AC_CONFIG_MACRO_DIR([m4])

AC_SUBST(ASSEMBLY_NAME)
AC_SUBST(ASSEMBLY_VERSION)
Expand All @@ -30,21 +30,21 @@ AC_SUBST(ASSEMBLY_PC)

dnl Check for pkg-config
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
if test "$PKG_CONFIG" = "no"; then
AC_MSG_ERROR(['pkg-config' is not in your PATH.])
fi

dnl Check for Mono
PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= 1.0, has_mono=true, has_mono=false)

if test "x$has_mono" = "xtrue"; then
1 AC_PATH_PROG(RUNTIME, mono, no)
if test "$has_mono" = "true"; then
AC_PATH_PROG(RUNTIME, mono, no)
AC_PATH_PROG(CSC, mcs, no)
LIB_PREFIX=.so
LIB_SUFFIX=
else
AC_PATH_PROG(CSC, csc.exe, no)
if test x$CSC = "xno"; then
if test "$CSC" = "no"; then
AC_MSG_ERROR([You need to install either mono or .Net])
else
RUNTIME=
Expand All @@ -54,17 +54,17 @@ else
fi

CS="C#"
if test "x$CSC" = "xno" ; then
if test "$CSC" = "no" ; then
AC_MSG_ERROR([No $CS compiler found])
fi

AC_PATH_PROG(GACUTIL, gacutil, no)
if test "x$GACUTIL" = "xno" ; then
if test "$GACUTIL" = "no" ; then
AC_MSG_ERROR([No gacutil tool found])
fi

GACUTIL_FLAGS="/package $ASSEMBLY_NAME /root "'$(DESTDIR)$(prefix)/lib'

AC_SUBST(RUNTIME)
AC_SUBST(CSC)
AC_SUBST(GACUTIL)
Expand All @@ -86,10 +86,10 @@ PKG_CHECK_MODULES(GAPI, gapi-3.0 >= 2.99.2)

dnl Check for gapi
AC_PATH_PROG(GAPI_PARSER, gapi3-parser, no)
if test "x$GAPI_PARSER" = "xno"; then
if test "$GAPI_PARSER" = "no"; then
AC_MSG_CHECKING(for gapi3-parser.exe)
GAPI_PARSER=`which gapi3-parser.exe 2> /dev/null`
if test "x$GAPI_PARSER" = "xno" ; then
if test "$GAPI_PARSER" = "no" ; then
AC_MSG_ERROR(['gapi3_parser'/'gapi3-parser.exe' not found.])
fi
AC_MSG_RESULT($GAPI_PARSER)
Expand All @@ -98,10 +98,10 @@ fi
AC_SUBST(GAPI_PARSER)

AC_PATH_PROG(GAPI_FIXUP, gapi3-fixup, no)
if test "x$GAPI_FIXUP" = "xno"; then
if test "$GAPI_FIXUP" = "no"; then
AC_MSG_CHECKING(for gapi3-fixup.exe)
GAPI_FIXUP=`which gapi3-fixup.exe 2> /dev/null`
if test "x$GAPI_FIXUP" = "xno" ; then
if test "$GAPI_FIXUP" = "no" ; then
AC_MSG_ERROR(['gapi3_fixup'/'gapi3-fixup.exe' not found.])
fi
AC_MSG_RESULT($GAPI_FIXUP)
Expand All @@ -110,10 +110,10 @@ fi
AC_SUBST(GAPI_FIXUP)

AC_PATH_PROG(GAPI_CODEGEN, gapi3-codegen, no)
if test "x$GAPI_CODEGEN" = "xno"; then
if test "$GAPI_CODEGEN" = "no"; then
AC_MSG_CHECKING(for gapi3_codegen.exe)
GAPI_CODEGEN=`which gapi3_codegen.exe 2> /dev/null`
if test "x$GAPI_CODEGEN" = "xno" ; then
if test "$GAPI_CODEGEN" = "no" ; then
AC_MSG_ERROR(['gapi3-codegen'/'gapi3_codegen.exe' not found.])
fi
AC_MSG_RESULT([$GAPI_CODEGEN])
Expand All @@ -123,18 +123,19 @@ AC_SUBST(GAPI_CODEGEN)

dnl Check for monodoc
AC_PATH_PROG(MDASSEMBLER, mdassembler, no)
AC_PATH_PROG(MONODOCER, monodocer, no)
if test "x$MONODOCER" = "xno" -o "x$MDASSEMBLER" = "xno"; then
AC_PATH_PROG(MDOC, mdoc, no)
if test "$MDOC" = "no" -o "$MDASSEMBLER" = "no"
then
enable_monodoc=no
doc_sources_dir=
else
enable_monodoc=yes
doc_sources_dir="`pkg-config --variable=sourcesdir monodoc`"
fi
AC_SUBST(MDASSEMBLER)
AC_SUBST(MONODOCER)
AC_SUBST(MDOC)

AM_CONDITIONAL(ENABLE_MONODOC, test "x$enable_monodoc" = "xyes")
AM_CONDITIONAL(ENABLE_MONODOC, test "$enable_monodoc" = "yes")
dnl Check for WebKit
PKG_CHECK_MODULES(WEBKIT, webkitgtk-3.0 >= 2.0)
webkitgtk_prefix=/usr
Expand Down Expand Up @@ -164,5 +165,5 @@ echo "---------------------"
echo ""
echo " * Installation prefix: $prefix"
echo " * compiler: $CSC"
echo " * Documentation: ($MONODOC)"
echo " * Documentation: ($enable_monodoc)"
echo ""
7 changes: 3 additions & 4 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ endif

ASSEMBLIES = $(top_srcdir)/out/$(ASSEMBLY_NAME).dll

UPDATE_ASSEMBLIES = $(addprefix -assembly:, $(ASSEMBLIES))

all: $(TARGETS)

update:
$(MONODOCER) $(UPDATE_ASSEMBLIES) -path:en
$(MDOC) update $(SOUPSHARP_LIBS) --out=en $(ASSEMBLIES)

$(srcdir)/en/*/*.xml $(srcdir)/en/*.xml:
$(MONODOCER) $(UPDATE_ASSEMBLIES) -path:en
$(MDOC) update $(SOUPSHARP_LIBS) --out=en $(ASSEMBLIES)

$(ASSEMBLY_NAME)-docs.source:
@echo "Generating $@"
Expand All @@ -31,6 +29,7 @@ $(ASSEMBLY_NAME)-docs.zip $(ASSEMBLY_NAME)-docs.tree: $(srcdir)/en/*/*.xml $(src
$(MDASSEMBLER) --ecma $(srcdir)/en -o $(ASSEMBLY_NAME)-docs

CLEANFILES = $(TARGETS)
DISTCLEANFILES = $(srcdir)/en/*/*.xml $(srcdir)/en/*.xml

NAMESPACES=$(ASSEMBLY_NAMESPACE)

Expand Down
2 changes: 2 additions & 0 deletions out/webkitgtk-sharp.dll.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<configuration>
<dllmap dll="webkitgtk-3.0" target="libwebkitgtk-3.0.so.0"/>
<dllmap dll="libsoup-2.4" target="libsoup-2.4.so.1"/>
<dllmap dll="libgtk-3-0.dll" target="libgtk-3.so.0"/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stsundermann Are we pinvoking these directly in our generated sources?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, I agree these additions are redundant.

</configuration>
6 changes: 3 additions & 3 deletions sources/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ sources =

build_sources = AssemblyInfo.cs $(sources)

CLEANFILES = $(DLL) generated-stamp generated/*.cs $(API)
CLEANFILES = $(DLL) generated-stamp generated/*/*.cs $(API)

DISTCLEANFILES = AssemblyInfo.cs $(DLLMAP)
DISTCLEANFILES = AssemblyInfo.cs
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a "sister" change from the EXTRA_DIST change above. The original commit message isn't very obvious (just says don't clear the dll map). Maybe some specific distro change where the dll map is custom managed or something?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I'll try to talk to the author and find out what exactly is this for.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I see the reason. The DLL map isn't being generated, it's a static file. That means, it shouldn't be remove on make distclean, but it currently is.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but why was it removed from EXTRA_DIST?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know yet, investigating. The patch author replied, but he couldn't explain the removal from EXTRA_DIST.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .dll.config needs to be installed with the .dll file. Isn't EXTRA_DIST the place to put those files?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that one probably was a mistake. I'm preparing a new patch series for webkitgtk-sharp and soup-sharp. Stay tuned ;)


noinst_DATA = $(DLL)

Expand All @@ -42,7 +42,7 @@ generated-stamp: $(API)

$(DLL): $(build_sources) generated-stamp
$(CSC) -nowarn:169 -unsafe -target:library $(GTK_SHARP_LIBS) \
$(build_sources) $(MONOCAIRO_LIBS) $(SOUPSHARP_LIBS) generated/*.cs generated/*/*.cs -out:$(DLL)
$(build_sources) $(MONOCAIRO_LIBS) $(SOUPSHARP_LIBS) generated/*/*.cs -out:$(DLL)

install-data-local:
echo "$(GACUTIL) /i $(DLL) /f $(GACUTIL_FLAGS)"; \
Expand Down
4 changes: 3 additions & 1 deletion sources/glue/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ libwebkitgtksharpglue_1_10_2_la_LDFLAGS = -module -avoid-version -no-undefined

libwebkitgtksharpglue_1_10_2_la_LIBADD = $(WEBKIT_LIBS)

INCLUDES = $(WEBKIT_CFLAGS) -I$(top_srcdir)
AM_CPPFLAGS = $(WEBKIT_CFLAGS) -I$(top_srcdir)

libwebkitgtksharpglue.dll: $(libwebkitgtksharpglue_1_10_2_la_OBJECTS) libwebkitgtksharpglue.rc libwebkitgtksharpglue.def
./build-dll libwebkitgtksharpglue $(VERSION)

CLEANFILES = lib*.a lib*.dll

DISTCLEANFILES = $(nodist_libwebkitgtksharpglue_1_10_2_la_SOURCES)

EXTRA_DIST =
2 changes: 2 additions & 0 deletions webkitgtk-sharp-3.0.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ prefix=@prefix@
exec_prefix=${prefix}
libdir=@libdir@
pkglibdir=${exec_prefix}/lib/mono/@ASSEMBLY_NAME@
gapidir=@GAPIXMLDIR@

Name: @ASSEMBLY_TITLE@
Description: @ASSEMBLY_DESCRIPTION@
Version: @VERSION@
Requires:
Libs: -r:${pkglibdir}/@ASSEMBLY_NAME@.dll
Cflags: -I:${gapidir}/webkitgtk-sharp-api.xml