]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge branch 't/m4_deps'
authorAndre Noll <maan@systemlinux.org>
Tue, 20 Aug 2013 19:31:38 +0000 (21:31 +0200)
committerAndre Noll <maan@systemlinux.org>
Tue, 20 Aug 2013 19:34:30 +0000 (21:34 +0200)
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.

Makefile.in
NEWS
configure.ac
m4/gengetopt/makefile

index f82afd7b88f65a9ad2d75032ca401d0445025272..487a9efe2bb6f51f9b3d5ad279aeae2cc5a2c469 100644 (file)
@@ -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 a1cdf58eb86e172573f6dc446154961b41f8b0fe..55b0277f0f5b9217c63d8e2d886105b5bc2aa12f 100644 (file)
--- 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"
index b3332c670f6eb610afa05f84adca763490e1e4c7..87e41d71ed044376fbd0af5550ebb394a732f39f 100644 (file)
@@ -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"
index 548a3d5d83bcb406a66dc26a77c0a840745d868f..035f44a5df4360e0a68eabe55dd6598a589141e1 100644 (file)
@@ -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 $<'