From: Lennart Poettering Date: Thu, 24 Jun 2010 23:50:03 +0000 (+0200) Subject: build-sys: make things more quiet X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=c8eacc0f13f6df529f2f40961e2ddb3a45dc9f93;p=catta build-sys: make things more quiet --- diff --git a/Makefile.am b/Makefile.am index c19e72c..ed20c96 100644 --- a/Makefile.am +++ b/Makefile.am @@ -151,136 +151,61 @@ DX_INPUT += \ endif pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = avahi-core.pc -avahi-core.pc: avahi-core.pc.in - sed -e 's,@prefix\@,$(prefix),g' \ +%.pc: %.pc.in + $(AM_V_GEN)sed -e 's,@prefix\@,$(prefix),g' \ -e 's,@libdir\@,$(libdir),g' \ -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@ +pkgconfig_DATA = avahi-core.pc CLEANFILES = avahi-core.pc if HAVE_DBUS - pkgconfig_DATA += avahi-client.pc - -avahi-client.pc: avahi-client.pc.in - sed -e 's,@prefix\@,$(prefix),g' \ - -e 's,@libdir\@,$(libdir),g' \ - -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@ - CLEANFILES += avahi-client.pc if ENABLE_COMPAT_HOWL - pkgconfig_DATA += avahi-compat-howl.pc - -avahi-compat-howl.pc: avahi-compat-howl.pc.in - sed -e 's,@prefix\@,$(prefix),g' \ - -e 's,@libdir\@,$(libdir),g' \ - -e 's,@HOWL_COMPAT_VERSION\@,$(HOWL_COMPAT_VERSION),g' $< > $@ - CLEANFILES += avahi-compat-howl.pc - endif if ENABLE_COMPAT_LIBDNS_SD - pkgconfig_DATA += avahi-compat-libdns_sd.pc - -avahi-compat-libdns_sd.pc: avahi-compat-libdns_sd.pc.in - sed -e 's,@prefix\@,$(prefix),g' \ - -e 's,@libdir\@,$(libdir),g' \ - -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@ - CLEANFILES += avahi-compat-libdns_sd.pc - endif if HAVE_MONO - pkgconfig_DATA += avahi-sharp.pc avahi-ui-sharp.pc - -avahi-sharp.pc: avahi-sharp.pc.in - sed -e 's,@prefix\@,$(prefix),g' \ - -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \ - -e 's,@libdir\@,$(libdir),g' $< > $@ - -avahi-ui-sharp.pc: avahi-ui-sharp.pc.in - sed -e 's,@prefix\@,$(prefix),g' \ - -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \ - -e 's,@libdir\@,$(libdir),g' $< > $@ - CLEANFILES += avahi-sharp.pc avahi-ui-sharp.pc - endif endif if HAVE_GLIB - pkgconfig_DATA += avahi-glib.pc - -avahi-glib.pc: avahi-glib.pc.in - sed -e 's,@prefix\@,$(prefix),g' \ - -e 's,@libdir\@,$(libdir),g' \ - -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@ - CLEANFILES += avahi-glib.pc if HAVE_GOBJECT - pkgconfig_DATA += avahi-gobject.pc - -avahi-gobject.pc: avahi-gobject.pc.in - sed -e 's,@prefix\@,$(prefix),g' \ - -e 's,@libdir\@,$(libdir),g' \ - -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@ - CLEANFILES += avahi-gobject.pc - endif endif if HAVE_GTK if HAVE_DBUS - pkgconfig_DATA += avahi-ui.pc - -avahi-ui.pc: avahi-ui.pc.in - sed -e 's,@prefix\@,$(prefix),g' \ - -e 's,@libdir\@,$(libdir),g' \ - -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@ - CLEANFILES += avahi-ui.pc - endif endif if HAVE_QT3 - pkgconfig_DATA += avahi-qt3.pc - -avahi-qt3.pc: avahi-qt3.pc.in - sed -e 's,@prefix\@,$(prefix),g' \ - -e 's,@libdir\@,$(libdir),g' \ - -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@ - CLEANFILES += avahi-qt3.pc - endif if HAVE_QT4 - pkgconfig_DATA += avahi-qt4.pc - -avahi-qt4.pc: avahi-qt4.pc.in - sed -e 's,@prefix\@,$(prefix),g' \ - -e 's,@libdir\@,$(libdir),g' \ - -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@ - CLEANFILES += avahi-qt4.pc - endif CLEANFILES += avahi.devhelp diff --git a/avahi-client/client-test.c b/avahi-client/client-test.c index 32e1487..11bac51 100644 --- a/avahi-client/client-test.c +++ b/avahi-client/client-test.c @@ -106,7 +106,7 @@ static void avahi_service_browser_callback ( if (b && name) { - sr = avahi_service_resolver_new (avahi_service_browser_get_client (b), interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, 0, avahi_service_resolver_callback, "xxXXxx"); + sr = avahi_service_resolver_new (avahi_service_browser_get_client (b), interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, 0, avahi_service_resolver_callback, (char*) "xxXXxx"); printf("New service resolver %p\n", (void*) sr); } } @@ -162,7 +162,7 @@ static void avahi_host_name_resolver_callback ( return; } client = avahi_host_name_resolver_get_client (r); - ar = avahi_address_resolver_new(client, interface, protocol, a, 0, avahi_address_resolver_callback, "omghai6u"); +ar = avahi_address_resolver_new(client, interface, protocol, a, 0, avahi_address_resolver_callback, (char*) "omghai6u"); if (ar) { printf ("Succesfully created address resolver object\n"); @@ -228,7 +228,7 @@ int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { simple_poll = avahi_simple_poll_new(); poll_api = avahi_simple_poll_get(simple_poll); - if (!(avahi = avahi_client_new(poll_api, 0, avahi_client_callback, "omghai2u", &error))) { + if (!(avahi = avahi_client_new(poll_api, 0, avahi_client_callback, (char*) "omghai2u", &error))) { fprintf(stderr, "Client failed: %s\n", avahi_strerror(error)); goto fail; } @@ -250,7 +250,7 @@ int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { cookie = avahi_client_get_local_service_cookie(avahi); printf("Local service cookie: %u (Error Return: %s)\n", cookie, cookie != AVAHI_SERVICE_COOKIE_INVALID ? "OK" : avahi_strerror(avahi_client_errno(avahi))); - group = avahi_entry_group_new(avahi, avahi_entry_group_callback, "omghai"); + group = avahi_entry_group_new(avahi, avahi_entry_group_callback, (char*) "omghai"); printf("Creating entry group: %s\n", group ? "OK" : avahi_strerror(avahi_client_errno (avahi))); assert(group); @@ -262,26 +262,26 @@ int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { avahi_entry_group_commit (group); - domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, "omghai3u"); + domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u"); if (domain == NULL) printf ("Failed to create domain browser object\n"); else printf ("Sucessfully created domain browser %p\n", (void*) domain); - st = avahi_service_type_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, 0, avahi_service_type_browser_callback, "omghai3u"); + st = avahi_service_type_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, 0, avahi_service_type_browser_callback, (char*) "omghai3u"); if (st == NULL) printf ("Failed to create service type browser object\n"); else printf ("Sucessfully created service type browser %p\n", (void*) st); - sb = avahi_service_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_http._tcp", NULL, 0, avahi_service_browser_callback, "omghai3u"); + sb = avahi_service_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_http._tcp", NULL, 0, avahi_service_browser_callback, (char*) "omghai3u"); if (sb == NULL) printf ("Failed to create service browser object\n"); else printf ("Sucessfully created service browser %p\n", (void*) sb); - hnr = avahi_host_name_resolver_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "ecstasy.local", AVAHI_PROTO_UNSPEC, 0, avahi_host_name_resolver_callback, "omghai4u"); + hnr = avahi_host_name_resolver_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "ecstasy.local", AVAHI_PROTO_UNSPEC, 0, avahi_host_name_resolver_callback, (char*) "omghai4u"); if (hnr == NULL) printf ("Failed to create hostname resolver object\n"); else @@ -291,7 +291,7 @@ int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { if (aar == NULL) { printf ("failed to create address object\n"); } else { - group2 = avahi_entry_group_new (avahi, avahi_entry_group2_callback, "omghai222"); + group2 = avahi_entry_group_new (avahi, avahi_entry_group2_callback, (char*) "omghai222"); if ((error = avahi_entry_group_add_address (group2, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "test-mdns.local.", aar)) < 0) { printf ("*** failed to add address to entry group: %s\n", avahi_strerror (error)); diff --git a/avahi-core/prioq-test.c b/avahi-core/prioq-test.c index 3d85b78..38f55fb 100644 --- a/avahi-core/prioq-test.c +++ b/avahi-core/prioq-test.c @@ -32,8 +32,8 @@ #include "prioq.h" -#define POINTER_TO_INT(p) ((int) (p)) -#define INT_TO_POINTER(i) ((void*) (i)) +#define POINTER_TO_INT(p) ((int) (long) (p)) +#define INT_TO_POINTER(i) ((void*) (long) (i)) static int compare_int(const void* a, const void* b) { int i = POINTER_TO_INT(a), j = POINTER_TO_INT(b); diff --git a/avahi-core/timeeventq-test.c b/avahi-core/timeeventq-test.c index e02a685..822ef85 100644 --- a/avahi-core/timeeventq-test.c +++ b/avahi-core/timeeventq-test.c @@ -32,8 +32,8 @@ #include "timeeventq.h" #include "log.h" -#define POINTER_TO_INT(p) ((int) (p)) -#define INT_TO_POINTER(i) ((void*) (i)) +#define POINTER_TO_INT(p) ((int) (long) (p)) +#define INT_TO_POINTER(i) ((void*) (long) (i)) static AvahiTimeEventQueue *q = NULL; diff --git a/avahi-gobject/Makefile.am b/avahi-gobject/Makefile.am index 15d00df..b2a09c7 100644 --- a/avahi-gobject/Makefile.am +++ b/avahi-gobject/Makefile.am @@ -74,10 +74,10 @@ dist-hook: $(shell for x in $(BUILT_SOURCES); do rm -f $(distdir)/$$x ; done) signals-marshal.list: $(CORE_SOURCES) Makefile.am - ( cd $(srcdir) && \ + $(AM_V_GEN)( cd $(srcdir) && \ sed -n -e 's/.*_ga_signals_marshal_\([A-Z]*__[A-Z_]*\).*/\1/p' \ $(CORE_SOURCES) ) \ - | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp + | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp && \ if cmp -s $@.tmp $@; then \ rm $@.tmp; \ else \ @@ -85,15 +85,15 @@ signals-marshal.list: $(CORE_SOURCES) Makefile.am fi signals-marshal.h: signals-marshal.list - glib-genmarshal --header --prefix=_ga_signals_marshal $< > $@ + $(AM_V_GEN)glib-genmarshal --header --prefix=_ga_signals_marshal $< > $@ signals-marshal.c: signals-marshal.list - glib-genmarshal --body --prefix=_ga_signals_marshal $< > $@ + $(AM_V_GEN)glib-genmarshal --body --prefix=_ga_signals_marshal $< > $@ # rules for making the glib enum objects %-enumtypes.h: %.h Makefile.in - glib-mkenums \ + $(AM_V_GEN)glib-mkenums \ --fhead "#ifndef __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__\n#define __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__\n\n#include \n\nG_BEGIN_DECLS\n" \ --fprod "/* enumerations from \"@filename@\" */\n" \ --vhead "GType @enum_name@_get_type (void);\n#define $(shell echo $* | tr [:lower:]- [:upper:]_ | sed 's/_.*//')_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \ @@ -101,7 +101,7 @@ signals-marshal.c: signals-marshal.list $< > $@ %-enumtypes.c: %.h Makefile.in - glib-mkenums \ + $(AM_V_GEN)glib-mkenums \ --fhead "#include <$*.h>" \ --fprod "\n/* enumerations from \"@filename@\" */" \ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \ diff --git a/avahi-python/Makefile.am b/avahi-python/Makefile.am index 4989b4b..d7febd6 100644 --- a/avahi-python/Makefile.am +++ b/avahi-python/Makefile.am @@ -34,7 +34,7 @@ pythonscripts = \ avahi-bookmarks avahi-bookmarks: avahi-bookmarks.in - sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@ + $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@ && \ chmod +x $@ bin_SCRIPTS = $(pythonscripts) diff --git a/avahi-python/avahi/Makefile.am b/avahi-python/avahi/Makefile.am index c0c9c34..b168682 100644 --- a/avahi-python/avahi/Makefile.am +++ b/avahi-python/avahi/Makefile.am @@ -28,12 +28,12 @@ if HAVE_GDBM nodist_avahi_SCRIPTS = ServiceTypeDatabase.py ServiceTypeDatabase.py: ServiceTypeDatabase.py.in - sed -e 's,@PYTHON\@,$(PYTHON),g' \ + $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \ -e 's,@DBM\@,gdbm,g' \ -e 's,@FIRST_KEY\@,key = self.db.firstkey(),g' \ -e 's,@CHECK_KEY\@,while key is not None:,g' \ -e 's,@NEXT_KEY\@,key = self.db.nextkey(key),g' \ - -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ + -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ && \ chmod +x $@ endif @@ -41,12 +41,12 @@ if HAVE_DBM nodist_avahi_SCRIPTS = ServiceTypeDatabase.py ServiceTypeDatabase.py: ServiceTypeDatabase.py.in - sed -e 's,@PYTHON\@,$(PYTHON),g' \ + $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \ -e 's,@DBM\@,dbm,g' \ -e 's,@FIRST_KEY\@,keys = self.db.keys(),g' \ -e 's,@CHECK_KEY\@,for key in keys:,g' \ -e 's,@NEXT_KEY\@,,g' \ - -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ + -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ && \ chmod +x $@ endif diff --git a/avahi-qt/Makefile.am b/avahi-qt/Makefile.am index de13595..004e2d3 100644 --- a/avahi-qt/Makefile.am +++ b/avahi-qt/Makefile.am @@ -38,7 +38,7 @@ libavahi_qt3_la_SOURCES = \ qt-watch.cpp qt-watch.moc3: qt-watch.cpp - $(MOC_QT3) $^ > $@ + $(AM_V_GEN)$(MOC_QT3) $^ > $@ libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) $(VISIBILITY_HIDDEN_CFLAGS) libavahi_qt3_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT3_LIBS) @@ -60,7 +60,7 @@ libavahi_qt4_la_SOURCES = \ qt-watch.cpp qt-watch.moc4: qt-watch.cpp - $(MOC_QT4) $^ > $@ + $(AM_V_GEN)$(MOC_QT4) $^ > $@ libavahi_qt4_la_CPPFLAGS = $(AM_CFLAGS) $(QT4_CFLAGS) -DQT4 $(VISIBILITY_HIDDEN_CFLAGS) libavahi_qt4_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT4_LIBS) diff --git a/configure.ac b/configure.ac index 4e527bc..e22ce73 100644 --- a/configure.ac +++ b/configure.ac @@ -46,13 +46,16 @@ AC_CANONICAL_HOST AM_SILENT_RULES([yes]) -if type -p stow > /dev/null && test -d /usr/local/stow ; then - AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***]) - ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}" -fi +AC_CHECK_PROG([STOW], [stow], [yes], [no]) + +AS_IF([test "x$STOW" = "xyes" && test -d /usr/local/stow], [ + AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***]) + ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}" +]) # Checks for programs. AC_PROG_CC +AC_PROG_CC_C99 AC_PROG_CXX AM_PROG_CC_C_O AC_USE_SYSTEM_EXTENSIONS @@ -304,7 +307,7 @@ test_gcc_flag() { # If using GCC specify some additional parameters if test "x$GCC" = "xyes" ; then - DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline" + DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -fdiagnostics-show-option -Wno-cast-qual" if test "x$HAVE_NETLINK" = "xyes" ; then # Test whether rtnetlink.h can be included when compiled with -std=c99 @@ -418,7 +421,6 @@ AM_GLIB_GNU_GETTEXT avahilocaledir='${prefix}/${DATADIRNAME}/locale' AC_SUBST(avahilocaledir) - # Check for pkg-config manually first, as if its not installed the # PKG_PROG_PKG_CONFIG macro won't be defined. AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no) diff --git a/initscript/fedora/Makefile.am b/initscript/fedora/Makefile.am index e18f0f6..db27763 100644 --- a/initscript/fedora/Makefile.am +++ b/initscript/fedora/Makefile.am @@ -26,9 +26,9 @@ initd_SCRIPTS = avahi-daemon avahi-dnsconfd CLEANFILES = avahi-daemon avahi-dnsconfd avahi-daemon: avahi-daemon.in - sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ + $(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ && \ chmod +x $@ avahi-dnsconfd: avahi-dnsconfd.in - sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ + $(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ && \ chmod +x $@ diff --git a/man/Makefile.am b/man/Makefile.am index bbb8376..5b089ed 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -84,7 +84,7 @@ endif endif %.xml: %.xml.in Makefile - sed -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \ + $(AM_V_GEN) sed -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \ -e 's,@servicedir\@,$(servicedir),g' \ -e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \ -e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@ @@ -94,13 +94,13 @@ if USE_XMLTOMAN CLEANFILES += $(man_MANS) %.1: %.1.xml Makefile - xmltoman $< > $@ + $(AM_V_GEN)xmltoman $< > $@ %.5: %.5.xml Makefile - xmltoman $< > $@ + $(AM_V_GEN)xmltoman $< > $@ %.8: %.8.xml Makefile - xmltoman $< > $@ + $(AM_V_GEN)xmltoman $< > $@ xmllint: $(noinst_DATA) for f in $(noinst_DATA) ; do \