[libgweather] build: Update all Makefile.am to more recent standards
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather] build: Update all Makefile.am to more recent standards
- Date: Mon, 20 Sep 2010 15:58:36 +0000 (UTC)
commit 5628e63feaed211c6dd2b630e5e0969a80938206
Author: Vincent Untz <vuntz gnome org>
Date: Mon Sep 20 17:57:10 2010 +0200
build: Update all Makefile.am to more recent standards
Makefile.am | 6 +-
data/Makefile.am | 8 ++--
icons/Makefile.am | 32 ++++++++-------
libgweather/Makefile.am | 105 +++++++++++++++-------------------------------
4 files changed, 58 insertions(+), 93 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index d54aa50..f049097 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,13 +1,13 @@
-SUBDIRS = po po-locations libgweather doc data icons
+SUBDIRS = libgweather icons doc data po po-locations
ACLOCAL_AMFLAGS = -I m4
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
+
EXTRA_DIST = \
HACKING \
MAINTAINERS
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
-
MAINTAINERCLEANFILES = \
$(srcdir)/INSTALL \
$(srcdir)/aclocal.m4 \
diff --git a/data/Makefile.am b/data/Makefile.am
index f654f25..f1f82c0 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -53,10 +53,6 @@ $(LOCATIONS_STAMP): $(libgweatherlocations_in_files) $(PO_LOCATIONS) Makefile
endif # USE_ONE_BIG_XML
-check:
- xmllint --valid --noout $(top_srcdir)/data/Locations.xml.in
- $(srcdir)/check-timezones.sh $(srcdir)/Locations.xml.in
-
### Locations.xml.in rebuild
rebuild-locations: locationdb.sqlite update-locations.py
$(AM_V_GEN)($(srcdir)/update-locations.py > Locations.xml.in.new && mv Locations.xml.in.new Locations.xml.in) || rm -f Locations.xml.in.new
@@ -64,6 +60,10 @@ rebuild-locations: locationdb.sqlite update-locations.py
locationdb.sqlite: build-locationdb.pl major-cities.txt sources/nsd_cccc.txt sources/POP_PLACES.txt sources/US_CONCISE.txt sources/geonames_dd_dms_date_*.txt city-fixups.pl station-fixups.pl
$(AM_V_GEN)$(srcdir)/build-locationdb.pl
+check:
+ xmllint --valid --noout $(top_srcdir)/data/Locations.xml.in
+ $(srcdir)/check-timezones.sh $(srcdir)/Locations.xml.in
+
EXTRA_DIST = \
$(libgweatherlocations_in_files) \
$(libgweatherdtd_DATA) \
diff --git a/icons/Makefile.am b/icons/Makefile.am
index d57c1ef..63bf52c 100644
--- a/icons/Makefile.am
+++ b/icons/Makefile.am
@@ -1,4 +1,3 @@
-
public_icons = \
16x16_status_weather-clear-night-000.png \
16x16_status_weather-clear-night-010.png \
@@ -459,38 +458,41 @@ noinst_DATA = \
32x32_status_weather-few-clouds-night-350.svg \
moonshadow.pl
-EXTRA_DIST = \
- $(public_icons) \
- $(noinst_DATA)
+gtk_update_icon_cache = gtk-update-icon-cache -f -t
+install-data-local: install-icons
+uninstall-local: uninstall-icons
-gtk_update_icon_cache = gtk-update-icon-cache -f -t
+install-data-hook: update-icon-cache
+uninstall-hook: update-icon-cache
install-icons:
-for icon in $(public_icons); do \
ICON=`echo $$icon | sed -e 's:_:/:g'`; \
ICONDIR=`dirname $$ICON`; \
- mkdir -p $(DESTDIR)$(datadir)/$(subdir)/gnome/$$ICONDIR; \
- echo INSTALL $(DESTDIR)$(datadir)/$(subdir)/gnome/$$ICON; \
- $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/$(subdir)/gnome/$$ICON; \
+ mkdir -p $(DESTDIR)$(datadir)/icons/gnome/$$ICONDIR; \
+ echo INSTALL $(DESTDIR)$(datadir)/icons/gnome/$$ICON; \
+ $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/gnome/$$ICON; \
done;
uninstall-icons:
-for icon in $(public_icons); do \
ICON=`echo $$icon | sed -e 's:_:/:g'`; \
- echo rm -f $(DESTDIR)$(datadir)/$(subdir)/gnome/$$ICON; \
- rm -f $(DESTDIR)$(datadir)/$(subdir)/gnome/$$ICON; \
+ echo rm -f $(DESTDIR)$(datadir)/icons/gnome/$$ICON; \
+ rm -f $(DESTDIR)$(datadir)/icons/gnome/$$ICON; \
done
update-icon-cache:
@-if test -z "$(DESTDIR)"; then \
echo "Updating Gtk icon cache."; \
- $(gtk_update_icon_cache) $(DESTDIR)$(datadir)/$(subdir)/gnome; \
+ $(gtk_update_icon_cache) $(DESTDIR)$(datadir)/icons/gnome; \
else \
- echo "*** Icon cache not updated. After (un)install, run this:"; \
- echo "*** $(gtk_update_icon_cache) $(DESTDIR)$(datadir)/$(subdir)/gnome"; \
+ echo "*** Icon cache not updated. After (un)install, run this:"; \
+ echo "*** $(gtk_update_icon_cache) $(DESTDIR)$(datadir)/icons/gnome"; \
fi
-install-data-local: install-icons update-icon-cache
+EXTRA_DIST = \
+ $(public_icons) \
+ $(noinst_DATA)
-uninstall-local: uninstall-icons update-icon-cache
+-include $(top_srcdir)/git.mk
diff --git a/libgweather/Makefile.am b/libgweather/Makefile.am
index 1f2548b..d7d8402 100644
--- a/libgweather/Makefile.am
+++ b/libgweather/Makefile.am
@@ -1,18 +1,25 @@
lib_LTLIBRARIES = libgweather-3.la
+noinst_PROGRAMS = test_metar test_locations test_sun_moon
+
+AM_CPPFLAGS = \
+ $(GTK_CFLAGS) \
+ -I$(top_srcdir) \
+ -I$(srcdir)
+
+AM_CFLAGS = $(WARN_CFLAGS)
-libgweatherincdir = $(includedir)/libgweather-3.0/libgweather
gweather_old_headers = \
weather.h gweather-gconf.h gweather-prefs.h gweather-xml.h
gweather_new_headers = \
gweather-location.h location-entry.h \
gweather-timezone.h timezone-menu.h
+libgweatherincdir = $(includedir)/libgweather-3.0/libgweather
libgweatherinc_HEADERS = \
$(gweather_old_headers) \
$(gweather_new_headers) \
gweather-enum-types.h
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = gweather-3.0.pc
+noinst_HEADERS = weather-priv.h gweather-win32.h
libgweather_3_la_SOURCES = \
weather.c weather.h weather-priv.h \
@@ -36,11 +43,8 @@ else
EXTRA_libgweather_3_la_SOURCES = gweather-win32.c
endif
-libgweather_3_la_CFLAGS = \
- -I$(top_srcdir) \
- -I$(srcdir) \
- $(WARN_CFLAGS) \
- $(GTK_CFLAGS) \
+libgweather_3_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
$(LIBXML_CFLAGS) \
$(LIBSOUP_CFLAGS) \
$(GCONF_CFLAGS) \
@@ -59,7 +63,16 @@ libgweather_3_la_LIBADD = \
libgweather_3_la_LDFLAGS = \
-version-info $(LT_VERSION) -no-undefined
-MKENUMS_GENERATED = gweather-enum-types.c gweather-enum-types.h
+test_metar_SOURCES = test_metar.c
+test_metar_CPPFLAGS = $(AM_CPPFLAGS) $(LIBSOUP_CFLAGS)
+test_metar_LDADD = libgweather-3.la
+
+test_locations_SOURCES = test_locations.c
+test_locations_LDADD = libgweather-3.la
+
+test_sun_moon_SOURCES = test_sun_moon.c
+test_sun_moon_CPPFLAGS = $(AM_CPPFLAGS) $(LIBSOUP_CFLAGS)
+test_sun_moon_LDADD = libgweather-3.la
gweather-enum-types.h: $(gweather_new_headers)
$(AM_V_GEN)( cd $(srcdir) && $(GLIB_MKENUMS) --template gweather-enum-types.h.tmpl \
@@ -73,69 +86,25 @@ gweather-enum-types.c: $(libgweatherinclude_HEADERS)
&& mv gweather-enum-types.c.tmp gweather-enum-types.c \
|| rm -f gweather-enum-type.c.tmp
-BUILT_SOURCES = $(MKENUMS_GENERATED)
-
-test_metar_SOURCES = test_metar.c
-
-test_metar_CFLAGS = \
- -I$(top_srcdir) \
- -I$(srcdir) \
- $(WARN_CFLAGS) \
- $(GTK_CFLAGS) \
- $(LIBSOUP_CFLAGS) \
- -DG_LOG_DOMAIN=\"GWeather\"
-
-test_metar_LDADD = \
- $(LIBSOUP_LIBS) \
- $(REGEX_LIBS) \
- libgweather-3.la
-
-test_locations_SOURCES = test_locations.c
-
-test_locations_CFLAGS = \
- -I$(top_srcdir) \
- -I$(srcdir) \
- $(WARN_CFLAGS) \
- $(GTK_CFLAGS) \
- $(GNOME_VFS_APPLETS_CFLAGS) \
- -DG_LOG_DOMAIN=\"GWeather\"
+BUILT_SOURCES = gweather-enum-types.c gweather-enum-types.h
-test_locations_LDADD = libgweather-3.la
-
-test_sun_moon_SOURCES = \
- test_sun_moon.c
-
-test_sun_moon_CFLAGS = \
- -I$(top_srcdir) \
- -I$(srcdir) \
- $(WARN_CFLAGS) \
- $(GTK_CFLAGS) \
- $(LIBSOUP_CFLAGS) \
- -DG_LOG_DOMAIN=\"GWeather\"
-
-test_sun_moon_LDADD = \
- $(LIBSOUP_LIBS) \
- libgweather-3.la
-
-noinst_HEADERS = weather-priv.h gweather-win32.h
-noinst_PROGRAMS = test_metar test_locations test_sun_moon
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = gweather-3.0.pc
-schemadir = @GCONF_SCHEMA_FILE_DIR@
+schemadir = @GCONF_SCHEMA_FILE_DIR@
schema_in_files = gweather.schemas.in
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
@INTLTOOL_SCHEMAS_RULE@
-EXTRA_DIST = gweather.pc.in gweather-uninstalled.pc.in $(schema_in_files)
-
-EXTRA_PROGRAMS = test_metar test_sun_moon
+EXTRA_DIST = gweather-3.0.pc.in gweather-3.0-uninstalled.pc.in $(schema_in_files)
-CLEANFILES = $(schema_DATA) $(EXTRA_PROGRAMS) $(MKENUMS_GENERATED)
+CLEANFILES = $(schema_DATA) $(noinst_PROGRAMS) $(BUILT_SOURCES)
# Introspection
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
-INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir)
+INTROSPECTION_SCANNER_ARGS = --warn-all --add-include-path=$(srcdir)
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
if HAVE_INTROSPECTION
@@ -149,21 +118,15 @@ introspection_sources = \
GWeather-3.0.gir: libgweather-3.la Makefile
GWeather_3_0_gir_INCLUDES = GObject-2.0 Gtk-3.0
-GWeather_3_0_gir_CFLAGS = \
- -I$(top_srcdir) \
- $(GTK_CFLAGS) \
- $(LIBXML_CFLAGS) \
- $(LIBSOUP_CFLAGS) \
- $(GCONF_CFLAGS) \
- -DGWEATHER_I_KNOW_THIS_IS_UNSTABLE
+GWeather_3_0_gir_CFLAGS = $(libgweather_3_la_CPPFLAGS) -DGWEATHER_I_KNOW_THIS_IS_UNSTABLE
GWeather_3_0_gir_LIBS = libgweather-3.la
GWeather_3_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
INTROSPECTION_GIRS += GWeather-3.0.gir
-girdir = $(datadir)/gir-1.0
+girdir = $(INTROSPECTION_GIRDIR)
gir_DATA = $(INTROSPECTION_GIRS)
-typelibdir = $(libdir)/girepository-1.0
+typelibdir = $(INTROSPECTION_TYPELIBDIR)
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
@@ -173,12 +136,12 @@ if GCONF_SCHEMAS_INSTALL
install-data-local:
if test -z "$(DESTDIR)" ; then \
for p in $(schema_DATA) ; do \
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p ; \
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(top_builddir)/libgweather/$$p ; \
done \
fi
uninstall-local:
for p in $(schema_DATA) ; do \
- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-uninstall-rule $$p ; \
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-uninstall-rule $(top_builddir)/libgweather/$$p ; \
done
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]