From: Andre Noll Date: Tue, 20 Aug 2013 19:31:38 +0000 (+0200) Subject: Merge branch 't/m4_deps' X-Git-Tag: v0.5.0~9 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=77a0aff9b99cc7cfb6fef28a633300bf709a8d47;hp=650e5374914c1eb725ce7d2a720611bec22112bc Merge branch 't/m4_deps' This branch was cooking since 2013-08-04 and no problems showed up. e249d1 Generate ggo dependencies automatically. 8bf727 Add para_ prefix for executables in Makefile.in. --- diff --git a/Makefile.in b/Makefile.in index f82afd7b..487a9efe 100644 --- a/Makefile.in +++ b/Makefile.in @@ -8,7 +8,7 @@ MANDIR := @datarootdir@/man/man1 PACKAGE_VERSION := @PACKAGE_VERSION@ PACKAGE_STRING := @PACKAGE_STRING@ install_sh := @install_sh@ -executables := @executables@ +executables := $(addprefix para_, @executables@) ggo_descriptions_declared := @ggo_descriptions_declared@ GENGETOPT := @gengetopt@ @@ -34,6 +34,7 @@ object_dir := $(build_dir)/objects dep_dir := $(build_dir)/deps man_dir := $(build_dir)/man/man1 cmdline_dir := $(build_dir)/cmdline +m4depdir := $(build_dir)/m4deps DEBUG_CPPFLAGS += -g -Wunused -Wundef -W DEBUG_CPPFLAGS += -Wredundant-decls @@ -80,7 +81,7 @@ CPPFLAGS += @osl_cppflags@ LDFLAGS += @clock_gettime_ldflags@ -man_pages := $(patsubst %, $(man_dir)/%.1, @executables@) +man_pages := $(patsubst %, $(man_dir)/%.1, $(executables)) autocrap := config.h.in configure tarball_pfx := @PACKAGE_TARNAME@-$(PACKAGE_VERSION) @@ -98,12 +99,12 @@ else endif .PHONY: dep all clean distclean maintainer-clean install man tarball -all: dep @executables@ $(man_pages) +all: dep $(executables) $(man_pages) dep: $(deps) man: $(man_pages) tarball: $(tarball) -$(object_dir) $(man_dir) $(ggo_dir) $(cmdline_dir) $(dep_dir): +$(object_dir) $(man_dir) $(ggo_dir) $(cmdline_dir) $(dep_dir) $(m4depdir): $(Q) $(MKDIR_P) $@ -include $(m4_ggo_dir)/makefile @@ -230,6 +231,7 @@ all_objs := @recv_objs@ @filter_objs@ @client_objs@ @gui_objs@ \ @audiod_objs@ @audioc_objs@ @fade_objs@ @server_objs@ \ @write_objs@ @afh_objs@ @play_objs@ deps := $(addprefix $(dep_dir)/, $(all_objs:.o=.d)) +m4_deps := $(addprefix $(m4depdir)/, $(addsuffix .m4d, @executables@)) recv_objs := $(addprefix $(object_dir)/, @recv_objs@) filter_objs := $(addprefix $(object_dir)/, @filter_objs@) @@ -245,6 +247,7 @@ play_objs := $(addprefix $(object_dir)/, @play_objs@) ifeq ($(findstring clean, $(MAKECMDGOALS)),) -include $(deps) +-include $(m4_deps) endif para_recv: $(recv_objs) @@ -293,7 +296,7 @@ para_play: $(play_objs) clean: @[ -z "$(Q)" ] || echo 'CLEAN' - $(Q) rm -f @executables@ + $(Q) rm -f $(executables) $(Q) rm -rf $(object_dir) clean2: clean @@ -314,7 +317,7 @@ maintainer-clean: distclean install: all man $(MKDIR_P) $(BINDIR) $(MANDIR) - $(install_sh) -s -m 755 @executables@ $(BINDIR) + $(install_sh) -s -m 755 $(executables) $(BINDIR) $(install_sh) -m 644 $(man_pages) $(MANDIR) $(MKDIR_P) $(VARDIR) >/dev/null 2>&1 || true # not fatal, so don't complain diff --git a/NEWS b/NEWS index a1cdf58e..55b0277f 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ - Addblob commands can produce output. - The stat command no longer sends garbage when para_server was compiled against libgcrypt. + - Dependencies for gengetopt files are computed automatically. + This eliminates a constant source of build bugs. -------------------------------------- 0.4.13 (2013-07-29) "spectral gravity" diff --git a/configure.ac b/configure.ac index b3332c67..87e41d71 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,6 @@ AC_CONFIG_HEADER([config.h]) AC_CONFIG_FILES([Makefile]) AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)]) -AC_DEFUN([add_para],[$(for i in $@; do printf "para_$i "; done)]) AC_DEFUN([objlist_to_errlist],[$(for i in $@; do printf "DEFINE_ERRLIST($(echo $i| tr 'a-z' 'A-Z'));"; done) [const char **para_errlist[[]]] = {$(for i in $@; do printf "PARA_ERRLIST($(echo $i | tr 'a-z' 'A-Z')), "; done) }]) AC_PATH_PROG(UNAMEPATH, uname, no) if test "$UNAMEPATH" = "no"; then @@ -1325,7 +1324,7 @@ AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result], AC_DEFINE_UNQUOTED(AUDIO_FORMAT_HANDLERS, "$audio_format_handlers", [formats supported by para_server and para_afh]) -AC_SUBST(executables, add_para($executables)) +AC_SUBST(executables) recv_objs="$recv_cmdline_objs $recv_errlist_objs" filter_objs="$filter_cmdline_objs $filter_errlist_objs" diff --git a/m4/gengetopt/makefile b/m4/gengetopt/makefile index 548a3d5d..035f44a5 100644 --- a/m4/gengetopt/makefile +++ b/m4/gengetopt/makefile @@ -16,37 +16,11 @@ ifeq ($(ggo_descriptions_declared),no) echo 'extern const char *$(*F)_args_info_description;' >> $(cmdline_dir)/$(*F).cmdline.h endif -$(ggo_dir)/server.ggo $(ggo_dir)/audiod.ggo: \ - $(m4_ggo_dir)/loglevel.m4 $(m4_ggo_dir)/color.m4 \ - $(m4_ggo_dir)/config_file.m4 $(m4_ggo_dir)/logfile.m4 \ - $(m4_ggo_dir)/daemon.m4 $(m4_ggo_dir)/user.m4 \ - $(m4_ggo_dir)/group.m4 $(m4_ggo_dir)/log_timing.m4 \ - $(m4_ggo_dir)/config_file.m4 - -$(ggo_dir)/afh.ggo: $(m4_ggo_dir)/loglevel.m4 -$(ggo_dir)/audioc.ggo: \ - $(m4_ggo_dir)/loglevel.m4 \ - $(m4_ggo_dir)/history_file.m4 \ - $(m4_ggo_dir)/complete.m4 -$(ggo_dir)/filter.ggo: $(m4_ggo_dir)/loglevel.m4 -$(ggo_dir)/fsck.ggo: $(m4_ggo_dir)/loglevel.m4 -$(ggo_dir)/gui.ggo: $(m4_ggo_dir)/loglevel.m4 $(m4_ggo_dir)/config_file.m4 -$(ggo_dir)/recv.ggo: $(m4_ggo_dir)/loglevel.m4 -$(ggo_dir)/write.ggo: $(m4_ggo_dir)/loglevel.m4 \ - $(m4_ggo_dir)/channels.m4 \ - $(m4_ggo_dir)/sample_rate.m4 \ - $(m4_ggo_dir)/sample_format.m4 -$(ggo_dir)/client.ggo: \ - $(m4_ggo_dir)/loglevel.m4 \ - $(m4_ggo_dir)/config_file.m4 \ - $(m4_ggo_dir)/history_file.m4 \ - $(m4_ggo_dir)/complete.m4 -$(ggo_dir)/fade.ggo: $(m4_ggo_dir)/loglevel.m4 $(m4_ggo_dir)/config_file.m4 -$(ggo_dir)/resample_filter.ggo: \ - $(m4_ggo_dir)/channels.m4 \ - $(m4_ggo_dir)/sample_rate.m4 \ - $(m4_ggo_dir)/sample_format.m4 -$(ggo_dir)/play.ggo: $(m4_ggo_dir)/loglevel.m4 $(m4_ggo_dir)/config_file.m4 +$(m4depdir)/%.m4d: $(m4_ggo_dir)/%.m4 | $(m4depdir) + @[ -z "$(Q)" ] || echo 'M4D $<' + $(Q) m4 -I $(m4_ggo_dir) --debug=i $< 3>&1 1>/dev/null 2>&3 \ + | awk '{if ($$0 ~ "^m4debug: input read from ") \ + print "$(ggo_dir)/$(*F).ggo: " $$NF}' > $@ $(ggo_dir)/%.ggo: $(m4_ggo_dir)/%.m4 $(m4_ggo_dir)/header.m4 | $(ggo_dir) @[ -z "$(Q)" ] || echo 'M4 $<'