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.
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@
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
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)
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
@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@)
ifeq ($(findstring clean, $(MAKECMDGOALS)),)
-include $(deps)
+-include $(m4_deps)
endif
para_recv: $(recv_objs)
clean:
@[ -z "$(Q)" ] || echo 'CLEAN'
- $(Q) rm -f @executables@
+ $(Q) rm -f $(executables)
$(Q) rm -rf $(object_dir)
clean2: clean
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
- 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"
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
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"
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 $<'