.PHONY: bootstrap
bootstrap: all
find $(top_srcdir) -name "*.vala.stamp" | xargs rm -f
- $(MAKE) $(AM_MAKEFLAGS) all VALAC=$(abs_top_builddir)/compiler/valac V=$V
+ $(MAKE) $(AM_MAKEFLAGS) all VALAC=$(abs_top_builddir)/compiler/valac$(EXEEXT) V=$V
.PHONY: test
test:
#include <glib/gstdio.h>
#include <glib-object.h>
#include <signal.h>
-#include <sys/wait.h> /* waitpid */
#include <gmodule.h>
#include "scanner.h"
#include "gidlparser.h"
#include "gidlwriter.h"
#include "grealpath.h"
+#ifndef _WIN32
+#include <sys/wait.h> /* waitpid */
+#endif
+
typedef GType (*TypeFunction) (void);
close (cpp_out);
+#ifndef _WIN32
if (waitpid (pid, &status, 0) > 0)
+#else
+ /* We don't want to include <windows.h> as it clashes horribly
+ * with token names from scannerparser.h. So just declare
+ * WaitForSingleObject, GetExitCodeProcess and INFINITE here.
+ */
+ extern unsigned long __stdcall WaitForSingleObject(void*, int);
+ extern int __stdcall GetExitCodeProcess(void*, int*);
+#define INFINITE 0xffffffff
+
+ WaitForSingleObject (pid, INFINITE);
+
+ if (GetExitCodeProcess (pid, &status))
+#endif
{
if (status != 0)
{
g_spawn_close_pid (pid);
+#ifndef _WIN32
kill (pid, SIGKILL);
+#endif
g_error ("cpp returned error code: %d\n", status);
unlink (tmpname);
export G_DEBUG=fatal_warnings
-VALAC=$topbuilddir/compiler/valac
+VALAC=$topbuilddir/compiler/valac$EXEEXT
VALAFLAGS="--vapidir $vapidir --disable-warnings --main main --save-temps -X -g -X -O0 -X -pipe -X -lm -X -Werror=return-type -X -Werror=init-self -X -Werror=implicit -X -Werror=sequence-point -X -Werror=return-type -X -Werror=uninitialized -X -Werror=pointer-arith -X -Werror=int-to-pointer-cast -X -Werror=pointer-to-int-cast"
-VAPIGEN=$topbuilddir/vapigen/vapigen
+VAPIGEN=$topbuilddir/vapigen/vapigen$EXEEXT
VAPIGENFLAGS="--vapidir $vapidir"
# Incorporate the user's CFLAGS. Matters if the user decided to insert
BINDINGS = $(GIR_BINDINGS) $(GIDL_BINDINGS)
-VAPIGEN = $(top_builddir)/vapigen/vapigen
+VAPIGEN = $(top_builddir)/vapigen/vapigen$(EXEEXT)
VAPIGENFLAGS = --vapidir $(srcdir)
GENVAPI = $(VAPIGEN) $(VAPIGENFLAGS)
METADATADIR = $(srcdir)/metadata
NULL =
-VALAC = $(top_builddir)/compiler/valac
+VALAC = $(top_builddir)/compiler/valac$(EXEEXT)
SUBDIRS = \
vala-gen-introspect \
if ENABLE_UNVERSIONED
install-exec-hook:
- cd $(DESTDIR)$(bindir) && $(LN_S) -f vala-gen-introspect@PACKAGE_SUFFIX@$(EXEEXT) vala-gen-introspect$(EXEEXT)
+ cd $(DESTDIR)$(bindir) && $(LN_S) -f vala-gen-introspect@PACKAGE_SUFFIX@ vala-gen-introspect
endif