diff options
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | Makefile.am | 27 | ||||
-rwxr-xr-x | autogen.sh | 19 | ||||
-rwxr-xr-x | build-aux/git-version-gen | 158 | ||||
-rw-r--r-- | common/.gitignore | 12 | ||||
-rw-r--r-- | common/Makefile.am | 83 | ||||
-rw-r--r-- | common/client_demarshallers.h | 7 | ||||
-rw-r--r-- | common/client_marshallers.h | 9 | ||||
-rw-r--r-- | common/gl_canvas.c | 2 | ||||
-rw-r--r-- | common/gl_canvas.h | 6 | ||||
-rw-r--r-- | common/lines.h | 2 | ||||
-rw-r--r-- | configure.ac | 120 | ||||
-rw-r--r-- | git.mk | 212 | ||||
-rw-r--r-- | m4/.gitignore | 0 | ||||
-rw-r--r-- | python_modules/Makefile.am | 13 | ||||
m--------- | spice-protocol | 0 |
16 files changed, 644 insertions, 29 deletions
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..f7de75d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "spice-protocol"] + path = spice-protocol + url = ../spice-protocol diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..28450b4 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,27 @@ +NULL = +ACLOCAL_AMFLAGS = -I m4 + +SUBDIRS = python_modules common +DIST_SUBDIRS = spice-protocol $(SUBDIRS) + +EXTRA_DIST = \ + spice_codegen.py \ + spice.proto \ + spice1.proto \ + $(NULL) + +MAINTAINERCLEANFILES = \ + $(srcdir)/INSTALL \ + $(srcdir)/aclocal.m4 \ + $(srcdir)/autoscan.log \ + $(srcdir)/build-aux \ + $(srcdir)/config.h.in \ + $(srcdir)/m4/libtool.m4 \ + $(srcdir)/m4/ltoptions.m4 \ + $(srcdir)/m4/ltsugar.m4 \ + $(srcdir)/m4/ltversion.m4 \ + $(srcdir)/m4/lt~obsolete.m4 \ + `find "$(srcdir)" -type f -name Makefile.in -print` \ + $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..e4ada55 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e # exit on errors + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +olddir=`pwd` +cd "$srcdir" + +git submodule update --init + +mkdir -p m4 +autoreconf --verbose --force --install + +cd "$olddir" +if [ -z "$NOCONFIGURE" ]; then + "$srcdir"/configure --enable-maintainer-mode ${1+"$@"} +fi diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen new file mode 100755 index 0000000..5617eb8 --- /dev/null +++ b/build-aux/git-version-gen @@ -0,0 +1,158 @@ +#!/bin/sh +# Print a version string. +scriptversion=2010-06-14.19; # UTC + +# Copyright (C) 2007-2010 Free Software Foundation, Inc. +# +# 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 3 of the License, 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/>. + +# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/. +# It may be run two ways: +# - from a git repository in which the "git describe" command below +# produces useful output (thus requiring at least one signed tag) +# - from a non-git-repo directory containing a .tarball-version file, which +# presumes this script is invoked like "./git-version-gen .tarball-version". + +# In order to use intra-version strings in your project, you will need two +# separate generated version string files: +# +# .tarball-version - present only in a distribution tarball, and not in +# a checked-out repository. Created with contents that were learned at +# the last time autoconf was run, and used by git-version-gen. Must not +# be present in either $(srcdir) or $(builddir) for git-version-gen to +# give accurate answers during normal development with a checked out tree, +# but must be present in a tarball when there is no version control system. +# Therefore, it cannot be used in any dependencies. GNUmakefile has +# hooks to force a reconfigure at distribution time to get the value +# correct, without penalizing normal development with extra reconfigures. +# +# .version - present in a checked-out repository and in a distribution +# tarball. Usable in dependencies, particularly for files that don't +# want to depend on config.h but do want to track version changes. +# Delete this file prior to any autoconf run where you want to rebuild +# files to pick up a version string change; and leave it stale to +# minimize rebuild time after unrelated changes to configure sources. +# +# It is probably wise to add these two files to .gitignore, so that you +# don't accidentally commit either generated file. +# +# Use the following line in your configure.ac, so that $(VERSION) will +# automatically be up-to-date each time configure is run (and note that +# since configure.ac no longer includes a version string, Makefile rules +# should not depend on configure.ac for version updates). +# +# AC_INIT([GNU project], +# m4_esyscmd([build-aux/git-version-gen .tarball-version]), +# [bug-project@example]) +# +# Then use the following lines in your Makefile.am, so that .version +# will be present for dependencies, and so that .tarball-version will +# exist in distribution tarballs. +# +# BUILT_SOURCES = $(top_srcdir)/.version +# $(top_srcdir)/.version: +# echo $(VERSION) > $@-t && mv $@-t $@ +# dist-hook: +# echo $(VERSION) > $(distdir)/.tarball-version + +case $# in + 1|2) ;; + *) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version" \ + '[TAG-NORMALIZATION-SED-SCRIPT]' + exit 1;; +esac + +tarball_version_file=$1 +tag_sed_script="${2:-s/x/x/}" +nl=' +' + +# Avoid meddling by environment variable of the same name. +v= + +# First see if there is a tarball-only version file. +# then try "git describe", then default. +if test -f $tarball_version_file +then + v=`cat $tarball_version_file` || exit 1 + case $v in + *$nl*) v= ;; # reject multi-line output + [0-9]*) ;; + *) v= ;; + esac + test -z "$v" \ + && echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2 +fi + +if test -n "$v" +then + : # use $v +elif test -d .git \ + && v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \ + || git describe --abbrev=4 HEAD 2>/dev/null` \ + && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \ + && case $v in + v[0-9]*) ;; + *) (exit 1) ;; + esac +then + # Is this a new git that lists number of commits since the last + # tag or the previous older version that did not? + # Newer: v6.10-77-g0f8faeb + # Older: v6.10-g0f8faeb + case $v in + *-*-*) : git describe is okay three part flavor ;; + *-*) + : git describe is older two part flavor + # Recreate the number of commits and rewrite such that the + # result is the same as if we were using the newer version + # of git describe. + vtag=`echo "$v" | sed 's/-.*//'` + numcommits=`git rev-list "$vtag"..HEAD | wc -l` + v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`; + ;; + esac + + # Change the first '-' to a '.', so version-comparing tools work properly. + # Remove the "g" in git describe's output string, to save a byte. + v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; +else + v=UNKNOWN +fi + +v=`echo "$v" |sed 's/^v//'` + +# Don't declare a version "dirty" merely because a time stamp has changed. +git update-index --refresh > /dev/null 2>&1 + +dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty= +case "$dirty" in + '') ;; + *) # Append the suffix only if there isn't one already. + case $v in + *-dirty) ;; + *) v="$v-dirty" ;; + esac ;; +esac + +# Omit the trailing newline, so that m4_esyscmd can use the result directly. +echo "$v" | tr -d "$nl" + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/common/.gitignore b/common/.gitignore deleted file mode 100644 index be03ab6..0000000 --- a/common/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -*~ -.*.sw? -*.la -*.lo -*.loT -*.o -.deps -.dirstamp -.libs -Makefile -Makefile.in -\#* diff --git a/common/Makefile.am b/common/Makefile.am index 8551d6e..c9068a5 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -1,12 +1,31 @@ NULL = -noinst_LTLIBRARIES = libspice-common.la +# Avoid need for python(pyparsing) by end users +MARSHALLERS = \ + $(srcdir)/generated_demarshallers.c \ + $(srcdir)/generated_demarshallers1.c \ + $(srcdir)/generated_marshallers.c \ + $(srcdir)/generated_marshallers1.c \ + $(NULL) + +SERVER_MARSHALLERS = \ + $(srcdir)/generated_server_demarshallers.c \ + $(srcdir)/generated_server_marshallers.c \ + $(srcdir)/generated_server_marshallers.h \ + $(NULL) + +BUILT_SOURCES = $(MARSHALLERS) $(SERVER_MARSHALLERS) + +noinst_LTLIBRARIES = libspice-common.la libspice-common-server.la libspice_common_la_SOURCES = \ + $(MARSHALLERS) \ + backtrace.c \ + backtrace.h \ bitops.h \ - client_marshallers.h \ - client_demarshallers.h \ canvas_utils.c \ canvas_utils.h \ + client_demarshallers.h \ + client_marshallers.h \ draw.h \ lines.c \ lines.h \ @@ -37,41 +56,85 @@ libspice_common_la_SOURCES = \ spice_common.h \ ssl_verify.c \ ssl_verify.h \ - backtrace.c \ - backtrace.h \ $(NULL) +libspice_common_server_la_SOURCES = \ + $(SERVER_MARSHALLERS) \ + $(NULL) + +libspice_common_server_la_CFLAGS = -DFIXME_SERVER_SMARTCARD + if SUPPORT_GL libspice_common_la_SOURCES += \ gl_utils.h \ - glc.h \ glc.c \ - ogl_ctx.h \ + glc.h \ ogl_ctx.c \ + ogl_ctx.h \ $(NULL) endif -AM_CPPFLAGS = \ +AM_CPPFLAGS = \ $(GL_CFLAGS) \ $(PIXMAN_CFLAGS) \ $(PROTOCOL_CFLAGS) \ + $(SMARTCARD_CFLAGS) \ $(VISIBILITY_HIDDEN_CFLAGS) \ $(WARN_CFLAGS) \ -std=gnu99 \ $(NULL) +MARSHALLERS_DEPS = \ + $(top_srcdir)/python_modules/__init__.py \ + $(top_srcdir)/python_modules/codegen.py \ + $(top_srcdir)/python_modules/demarshal.py \ + $(top_srcdir)/python_modules/marshal.py \ + $(top_srcdir)/python_modules/ptypes.py \ + $(top_srcdir)/python_modules/spice_parser.py \ + $(top_srcdir)/spice_codegen.py \ + Makefile \ + $(NULL) + +# Note despite being autogenerated these are not part of CLEANFILES, they are +# actually a part of EXTRA_DIST, to avoid the need for pyparser by end users +generated_demarshallers.c: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS) + $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include messages.h $< $@ >/dev/null + +generated_demarshallers1.c: $(top_srcdir)/spice1.proto $(MARSHALLERS_DEPS) + $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --client --include messages.h --prefix 1 --ptrsize 8 $< $@ >/dev/null + +generated_marshallers.c: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS) + $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers -P --include messages.h --include client_marshallers.h --client $< $@ >/dev/null + +generated_marshallers1.c: $(top_srcdir)/spice1.proto $(MARSHALLERS_DEPS) + $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers -P --include messages.h --include client_marshallers.h --client --prefix 1 --ptrsize 8 $< $@ >/dev/null + +generated_server_demarshallers.c: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS) + $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-demarshallers --server --include messages.h $< $@ >/dev/null + +STRUCTS = -M String -M Rect -M Point -M DisplayBase -M Fill -M Opaque -M Copy -M Blend -M Blackness -M Whiteness -M Invers -M Rop3 -M Stroke -M Text -M Transparent -M AlphaBlend +generated_server_marshallers.c: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS) + $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers $(STRUCTS) --server --include messages.h $< $@ >/dev/null + +generated_server_marshallers.h: $(top_srcdir)/spice.proto $(MARSHALLERS_DEPS) + $(AM_V_GEN)$(PYTHON) $(top_srcdir)/spice_codegen.py --generate-marshallers $(STRUCTS) --server --include messages.h -H $< $@ >/dev/null + EXTRA_DIST = \ + $(MARSHALLERS) \ + $(SERVER_MARSHALLERS) \ canvas_base.c \ canvas_base.h \ gdi_canvas.c \ gdi_canvas.h \ gl_canvas.c \ gl_canvas.h \ - sw_canvas.c \ - sw_canvas.h \ lz_compress_tmpl.c \ lz_decompress_tmpl.c \ quic_family_tmpl.c \ quic_rgb_tmpl.c \ quic_tmpl.c \ + sw_canvas.c \ + sw_canvas.h \ $(NULL) + +-include $(top_srcdir)/git.mk diff --git a/common/client_demarshallers.h b/common/client_demarshallers.h index fc2f75a..af095a0 100644 --- a/common/client_demarshallers.h +++ b/common/client_demarshallers.h @@ -17,6 +17,11 @@ #ifndef _H_DEMARSHAL #define _H_DEMARSHAL +#include <stddef.h> +#include <spice/macros.h> + +SPICE_BEGIN_DECLS + typedef void (*message_destructor_t)(uint8_t *message); typedef uint8_t * (*spice_parse_channel_func_t)(uint8_t *message_start, uint8_t *message_end, uint16_t message_type, int minor, size_t *size_out, message_destructor_t *free_message); @@ -24,5 +29,7 @@ typedef uint8_t * (*spice_parse_channel_func_t)(uint8_t *message_start, uint8_t spice_parse_channel_func_t spice_get_server_channel_parser(uint32_t channel, unsigned int *max_message_type); spice_parse_channel_func_t spice_get_server_channel_parser1(uint32_t channel, unsigned int *max_message_type); +SPICE_END_DECLS + #endif diff --git a/common/client_marshallers.h b/common/client_marshallers.h index c192d5b..f7322d1 100644 --- a/common/client_marshallers.h +++ b/common/client_marshallers.h @@ -24,8 +24,11 @@ #endif #include <spice/protocol.h> -#include <marshaller.h> -#include <messages.h> + +#include "marshaller.h" +#include "messages.h" + +SPICE_BEGIN_DECLS typedef struct { void (*msg_SpiceMsgEmpty)(SpiceMarshaller *m, SpiceMsgEmpty *msg); @@ -71,4 +74,6 @@ typedef struct { SpiceMessageMarshallers *spice_message_marshallers_get(void); SpiceMessageMarshallers *spice_message_marshallers_get1(void); +SPICE_END_DECLS + #endif diff --git a/common/gl_canvas.c b/common/gl_canvas.c index a2ca9e1..2adc986 100644 --- a/common/gl_canvas.c +++ b/common/gl_canvas.c @@ -23,9 +23,11 @@ #include <stdlib.h> #include <string.h> +#include "gl_canvas.h" #include "quic.h" #include "rop3.h" #include "region.h" +#include "glc.h" #define GL_CANVAS #include "canvas_base.c" diff --git a/common/gl_canvas.h b/common/gl_canvas.h index aab6039..33b9fad 100644 --- a/common/gl_canvas.h +++ b/common/gl_canvas.h @@ -16,15 +16,15 @@ License along with this library; if not, see <http://www.gnu.org/licenses/>. */ +#ifndef _H__GL_CANVAS +#define _H__GL_CANVAS + #include <spice/macros.h> #include "glc.h" #include "canvas_base.h" #include "region.h" -#ifndef _H__GL_CANVAS -#define _H__GL_CANVAS - SPICE_BEGIN_DECLS SpiceCanvas *gl_canvas_create(int width, int height, uint32_t format diff --git a/common/lines.h b/common/lines.h index 30a2b8c..d98686f 100644 --- a/common/lines.h +++ b/common/lines.h @@ -49,11 +49,11 @@ SOFTWARE. #ifndef LINES_H #define LINES_H -#include <pixman_utils.h> #include <stdlib.h> #include <string.h> #include <spice/macros.h> +#include "pixman_utils.h" #include "draw.h" SPICE_BEGIN_DECLS diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..1178069 --- /dev/null +++ b/configure.ac @@ -0,0 +1,120 @@ +AC_PREREQ([2.68]) + +AC_INIT([spice-common], + [m4_esyscmd(build-aux/git-version-gen .tarball-version)], + [spice-devel@lists.freedesktop.org]) + +AC_CONFIG_SRCDIR([common/bitops.h]) +AC_CONFIG_MACRO_DIR([m4]) +AM_CONFIG_HEADER([config.h]) +AC_CONFIG_AUX_DIR([build-aux]) + +# Checks for programs +AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip tar-ustar foreign -Wall -Werror]) +AM_MAINTAINER_MODE +AM_SILENT_RULES([yes]) +LT_INIT + +AC_PROG_CC +AC_PROG_CC_C99 +if test "x$ac_cv_prog_cc_c99" = xno; then + AC_MSG_ERROR([C99 compiler is required.]) +fi +AM_PROG_CC_C_O + +# Checks for libraries +AC_CONFIG_SUBDIRS([spice-protocol]) +PROTOCOL_CFLAGS='-I ${top_srcdir}/spice-protocol' +AC_SUBST(PROTOCOL_CFLAGS) + +PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.17.7) +AC_SUBST(PIXMAN_CFLAGS) + +AC_ARG_ENABLE([smartcard], + AS_HELP_STRING([--enable-smartcard=@<:@yes/no@:>@], + [Enable smartcard support @<:@default=yes@:>@]), + [], + [enable_smartcard="yes"]) + +if test "x$enable_smartcard" = "xno"; then + AM_CONDITIONAL(WITH_SMARTCARD, false) +else + PKG_CHECK_MODULES(SMARTCARD, libcacard >= 0.1.2) + AC_DEFINE(USE_SMARTCARD, [1], [Define if supporting smartcard proxying]) + AM_CONDITIONAL(WITH_SMARTCARD, true) +fi + +AC_ARG_ENABLE([opengl], + AS_HELP_STRING([--enable-opengl=@<:@yes/no@:>@], + [Enable opengl support (not recommended) @<:@default=no@:>@]), + [], + [enable_opengl="no"]) +AM_CONDITIONAL(SUPPORT_GL, test "x$enable_opengl" = "xyes") + +if test "x$enable_opengl" = "xyes"; then + AC_CHECK_LIB(GL, glBlendFunc, GL_LIBS="$GL_LIBS -lGL", enable_opengl=no) + AC_CHECK_LIB(GLU, gluSphere, GL_LIBS="$GL_LIBS -lGLU", enable_opengl=no) + AC_DEFINE([USE_OPENGL], [1], [Define to build with OpenGL support]) + AC_DEFINE([GL_GLEXT_PROTOTYPES], [], [Enable GLExt prototypes]) + + if test "x$enable_opengl" = "xno"; then + AC_MSG_ERROR([GL libraries not available]) + fi +fi +AC_SUBST(GL_CFLAGS) +AC_SUBST(GL_LIBS) + +# Checks for header files +AC_PATH_X +AC_FUNC_ALLOCA +AC_CHECK_HEADERS([arpa/inet.h malloc.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/socket.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics +AC_C_INLINE +AC_TYPE_INT16_T +AC_TYPE_INT32_T +AC_TYPE_INT64_T +AC_TYPE_INT8_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT64_T +AC_TYPE_UINT8_T + +# Checks for library functions +# do not check malloc or realloc, since that cannot be cross-compiled checked +AC_FUNC_ERROR_AT_LINE +AC_FUNC_FORK +AC_CHECK_FUNCS([dup2 floor inet_ntoa memmove memset pow sqrt]) + +# Others +AC_CANONICAL_HOST + +AC_MSG_CHECKING([for native Win32]) +case "$host_os" in + *mingw*|*cygwin*) + os_win32=yes + ;; + *) + os_win32=no + ;; +esac +AC_MSG_RESULT([$os_win32]) +AM_CONDITIONAL([OS_WIN32],[test "$os_win32" = "yes"]) + +# The End! +AC_CONFIG_FILES([ + Makefile + common/Makefile + python_modules/Makefile +]) + +AH_BOTTOM([ +/* argh.. this is evil */ +#if defined(FIXME_SERVER_SMARTCARD) && defined(USE_SMARTCARD) +%:undef USE_SMARTCARD +#endif +]) + +AC_OUTPUT @@ -0,0 +1,212 @@ +# git.mk +# +# Copyright 2009, Red Hat, Inc. +# Copyright 2010,2011 Behdad Esfahbod +# Written by Behdad Esfahbod +# +# Copying and distribution of this file, with or without modification, +# is permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. +# +# The canonical source for this file is https://github.com/behdad/git.mk. +# +# To use in your project, import this file in your git repo's toplevel, +# then do "make -f git.mk". This modifies all Makefile.am files in +# your project to -include git.mk. Remember to add that line to new +# Makefile.am files you create in your project, or just rerun the +# "make -f git.mk". +# +# This enables automatic .gitignore generation. If you need to ignore +# more files, add them to the GITIGNOREFILES variable in your Makefile.am. +# But think twice before doing that. If a file has to be in .gitignore, +# chances are very high that it's a generated file and should be in one +# of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES. +# +# The only case that you need to manually add a file to GITIGNOREFILES is +# when remove files in one of mostlyclean-local, clean-local, distclean-local, +# or maintainer-clean-local make targets. +# +# Note that for files like editor backup, etc, there are better places to +# ignore them. See "man gitignore". +# +# If "make maintainer-clean" removes the files but they are not recognized +# by this script (that is, if "git status" shows untracked files still), send +# me the output of "git status" as well as your Makefile.am and Makefile for +# the directories involved and I'll diagnose. +# +# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see +# Makefile.am.sample in the git.mk git repo. +# +# Don't EXTRA_DIST this file. It is supposed to only live in git clones, +# not tarballs. It serves no useful purpose in tarballs and clutters the +# build dir. +# +# This file knows how to handle autoconf, automake, libtool, gtk-doc, +# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu. +# +# +# KNOWN ISSUES: +# +# - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the +# submodule doesn't find us. If you have configure.{in,ac} files in +# subdirs, add a proxy git.mk file in those dirs that simply does: +# "include $(top_srcdir)/../git.mk". Add more ..'s to your taste. +# And add those files to git. See vte/gnome-pty-helper/git.mk for +# example. +# + +git-all: git-mk-install + +git-mk-install: + @echo Installing git makefile + @any_failed=; \ + find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \ + if grep 'include .*/git.mk' $$x >/dev/null; then \ + echo $$x already includes git.mk; \ + else \ + failed=; \ + echo "Updating $$x"; \ + { cat $$x; \ + echo ''; \ + echo '-include $$(top_srcdir)/git.mk'; \ + } > $$x.tmp || failed=1; \ + if test x$$failed = x; then \ + mv $$x.tmp $$x || failed=1; \ + fi; \ + if test x$$failed = x; then : else \ + echo Failed updating $$x; >&2 \ + any_failed=1; \ + fi; \ + fi; done; test -z "$$any_failed" + +.PHONY: git-all git-mk-install + + +### .gitignore generation + +$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk + $(AM_V_GEN) \ + { \ + if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \ + for x in \ + $(DOC_MODULE)-decl-list.txt \ + $(DOC_MODULE)-decl.txt \ + tmpl/$(DOC_MODULE)-unused.sgml \ + "tmpl/*.bak" \ + xml html \ + ; do echo /$$x; done; \ + fi; \ + if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \ + for x in \ + $(_DOC_C_DOCS) \ + $(_DOC_LC_DOCS) \ + $(_DOC_OMF_ALL) \ + $(_DOC_DSK_ALL) \ + $(_DOC_HTML_ALL) \ + $(_DOC_MOFILES) \ + $(_DOC_POFILES) \ + $(DOC_H_FILE) \ + "*/.xml2po.mo" \ + "*/*.omf.out" \ + ; do echo /$$x; done; \ + fi; \ + if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \ + for x in \ + $(_HELP_LC_FILES) \ + $(_HELP_LC_STAMPS) \ + $(_HELP_MOFILES) \ + ; do echo /$$x; done; \ + fi; \ + if test "x$(gsettings_SCHEMAS)" = x; then :; else \ + for x in \ + $(gsettings_SCHEMAS:.xml=.valid) \ + $(gsettings__enum_file) \ + ; do echo /$$x; done; \ + fi; \ + if test -f $(srcdir)/po/Makefile.in.in; then \ + for x in \ + po/Makefile.in.in \ + po/Makefile.in \ + po/Makefile \ + po/POTFILES \ + po/stamp-it \ + po/.intltool-merge-cache \ + "po/*.gmo" \ + "po/*.mo" \ + po/$(GETTEXT_PACKAGE).pot \ + intltool-extract.in \ + intltool-merge.in \ + intltool-update.in \ + ; do echo /$$x; done; \ + fi; \ + if test -f $(srcdir)/configure; then \ + for x in \ + autom4te.cache \ + configure \ + config.h \ + stamp-h1 \ + libtool \ + config.lt \ + ; do echo /$$x; done; \ + fi; \ + if test "x$(DEJATOOL)" = x; then :; else \ + for x in \ + $(DEJATOOL) \ + ; do echo /$$x.sum; echo /$$x.log; done; \ + echo /site.exp; \ + fi; \ + for x in \ + .gitignore \ + $(GITIGNOREFILES) \ + $(CLEANFILES) \ + $(PROGRAMS) \ + $(check_PROGRAMS) \ + $(EXTRA_PROGRAMS) \ + $(LTLIBRARIES) \ + so_locations \ + .libs _libs \ + $(MOSTLYCLEANFILES) \ + "*.$(OBJEXT)" \ + "*.lo" \ + $(DISTCLEANFILES) \ + $(am__CONFIG_DISTCLEAN_FILES) \ + $(CONFIG_CLEAN_FILES) \ + TAGS ID GTAGS GRTAGS GSYMS GPATH tags \ + "*.tab.c" \ + $(MAINTAINERCLEANFILES) \ + $(BUILT_SOURCES) \ + $(DEPDIR) \ + Makefile \ + Makefile.in \ + "*.orig" \ + "*.rej" \ + "*.bak" \ + "*~" \ + ".*.sw[nop]" \ + ".dirstamp" \ + ; do echo /$$x; done; \ + } | \ + sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \ + sed 's@/[.]/@/@g' | \ + LC_ALL=C sort | uniq > $@.tmp && \ + mv $@.tmp $@; + +all: $(srcdir)/.gitignore gitignore-recurse-maybe +gitignore-recurse-maybe: + @if test "x$(SUBDIRS)" = "x$(DIST_SUBDIRS)"; then :; else \ + $(MAKE) $(AM_MAKEFLAGS) gitignore-recurse; \ + fi; +gitignore-recurse: + @for subdir in $(DIST_SUBDIRS); do \ + case " $(SUBDIRS) " in \ + *" $$subdir "*) :;; \ + *) test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse || echo "Skipping $$subdir");; \ + esac; \ + done +gitignore: $(srcdir)/.gitignore gitignore-recurse + +maintainer-clean: gitignore-clean +gitignore-clean: + -rm -f $(srcdir)/.gitignore + +.PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe diff --git a/m4/.gitignore b/m4/.gitignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/m4/.gitignore diff --git a/python_modules/Makefile.am b/python_modules/Makefile.am index 7d416df..50e1a71 100644 --- a/python_modules/Makefile.am +++ b/python_modules/Makefile.am @@ -1,5 +1,16 @@ NULL = -PYTHON_MODULES = __init__.py codegen.py demarshal.py marshal.py ptypes.py spice_parser.py +PYTHON_MODULES = \ + __init__.py \ + codegen.py \ + demarshal.py \ + marshal.py \ + ptypes.py \ + spice_parser.py \ + $(NULL) EXTRA_DIST = $(PYTHON_MODULES) + +DISTCLEANFILES = *.pyc + +-include $(top_srcdir)/git.mk diff --git a/spice-protocol b/spice-protocol new file mode 160000 +Subproject 32da251a6572e3463cff040d106bb47a04e5a90 |