Fix 'make distcheck'

* Make generation of the .gir file work for srcdir != builddir
* Add files to CLEANFILES as needed
* Don't distribute the generated file mutter.schemas
This commit is contained in:
Owen W. Taylor 2009-07-16 17:54:56 -04:00
parent b62ee94b89
commit 65565a96b7

View File

@ -198,6 +198,8 @@ typelib_DATA = Meta-$(api_version).typelib
# We need to strip out the attribute that would point back to libmutter-introspect # We need to strip out the attribute that would point back to libmutter-introspect
# so that libgirepository looks for symbols in the executable instead # so that libgirepository looks for symbols in the executable instead
Meta-$(api_version).gir: $(G_IR_SCANNER) mutter $(libmutterinclude_HEADERS) $(mutter_SOURCES) Meta-$(api_version).gir: $(G_IR_SCANNER) mutter $(libmutterinclude_HEADERS) $(mutter_SOURCES)
pwd=`pwd` ; \
cd $(srcdir) && \
$(G_IR_SCANNER) \ $(G_IR_SCANNER) \
--namespace=Meta \ --namespace=Meta \
--nsversion=$(api_version) \ --nsversion=$(api_version) \
@ -208,11 +210,11 @@ Meta-$(api_version).gir: $(G_IR_SCANNER) mutter $(libmutterinclude_HEADERS) $(mu
--pkg=clutter-0.9 \ --pkg=clutter-0.9 \
--pkg=gtk+-2.0 \ --pkg=gtk+-2.0 \
--include=xfixes-4.0 \ --include=xfixes-4.0 \
--program=./mutter \ --program=$$pwd/mutter \
$(filter %.c,$(mutter_SOURCES)) \ $(filter %.c,$(mutter_SOURCES)) \
$(libmutterinclude_base_headers) \ $(libmutterinclude_base_headers) \
$(INCLUDES) \ $(INCLUDES) \
-o $@ -o $$pwd/$@
Meta-$(api_version).typelib: $(G_IR_COMPILER) Meta-$(api_version).gir Meta-$(api_version).typelib: $(G_IR_COMPILER) Meta-$(api_version).gir
LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}. $(G_IR_COMPILER) Meta-$(api_version).gir -o $@ LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}. $(G_IR_COMPILER) Meta-$(api_version).gir -o $@
@ -267,7 +269,14 @@ VARIABLES=stock_maximize_data $(srcdir)/stock_maximize.png \
stock_delete_data $(srcdir)/stock_delete.png stock_delete_data $(srcdir)/stock_delete.png
BUILT_SOURCES = inlinepixbufs.h BUILT_SOURCES = inlinepixbufs.h
CLEANFILES = inlinepixbufs.h mutter.desktop mutter-wm.desktop mutter.schemas CLEANFILES = \
inlinepixbufs.h \
mutter.desktop \
mutter-wm.desktop \
mutter.schemas \
$(mutter_built_sources) \
$(typelib_DATA) \
$(gir_DATA)
inlinepixbufs.h: $(IMAGES) inlinepixbufs.h: $(IMAGES)
$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h
@ -278,7 +287,7 @@ pkgconfig_DATA = libmutter-private.pc mutter-plugins.pc
EXTRA_DIST=$(desktopfiles_files) \ EXTRA_DIST=$(desktopfiles_files) \
$(wmproperties_files) \ $(wmproperties_files) \
$(IMAGES) $(schema_DATA) \ $(IMAGES) \
$(desktopfiles_in_files) \ $(desktopfiles_in_files) \
$(wmproperties_in_files) \ $(wmproperties_in_files) \
$(schema_in_files) \ $(schema_in_files) \
@ -289,7 +298,7 @@ EXTRA_DIST=$(desktopfiles_files) \
mutter-marshal.list mutter-marshal.list
BUILT_SOURCES += $(mutter_built_sources) BUILT_SOURCES += $(mutter_built_sources)
MUTTER_STAMP_FILES = stamp-mutter-marshal.h MUTTER_STAMP_FILES = stamp-mutter-marshal.h stamp-mutter-enum-types.h
CLEANFILES += $(MUTTER_STAMP_FILES) CLEANFILES += $(MUTTER_STAMP_FILES)
mutter-marshal.h: stamp-mutter-marshal.h mutter-marshal.h: stamp-mutter-marshal.h
@ -330,4 +339,3 @@ mutter-enum-types.c: stamp-mutter-enum-types.h mutter-enum-types.c.in
$(libmutterinclude_base_headers) ) >> xgen-tetc && \ $(libmutterinclude_base_headers) ) >> xgen-tetc && \
cp xgen-tetc mutter-enum-types.c && \ cp xgen-tetc mutter-enum-types.c && \
rm -f xgen-tetc rm -f xgen-tetc