]> git.tue.mpg.de Git - paraslash.git/commitdiff
Don't hardcode the list of executables in Makefile.in.
authorAndre Noll <maan@systemlinux.org>
Tue, 19 Jan 2010 00:21:32 +0000 (01:21 +0100)
committerAndre Noll <maan@systemlinux.org>
Tue, 19 Jan 2010 00:21:32 +0000 (01:21 +0100)
Just export the list via the $all_executables variable from configure.ac. Rename it to
$ececutables while we're at it and remove two unused variables in configure.ac.

Makefile.in
configure.ac

index f2a28af2a210e88f3858645a7ea39611f30dc3df..426072c8431ee4466dbfd60ce97012a11da2eb78 100644 (file)
@@ -61,11 +61,8 @@ CPPFLAGS += -I$(cmdline_dir)
 CPPFLAGS += @osl_cppflags@
 CPPFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"'
 
-BINARIES = para_server para_audiod para_client para_audioc para_recv \
-       para_filter para_write para_afh @extra_binaries@
-man_binaries := $(BINARIES)
-man_pages := $(patsubst %, man/man1/%.1, $(man_binaries))
-man_pages_in := $(patsubst %, web/%.man.in.html, $(man_binaries))
+man_pages := $(patsubst %, man/man1/%.1, @executables@)
+man_pages_in := $(patsubst %, web/%.man.in.html, @executables@)
 
 ggo_dir := ggo
 object_dir := objects
@@ -104,14 +101,14 @@ endif
 
 .PHONY: all clean distclean maintainer-clean install man tarball\
        .FORCE-GIT-VERSION-FILE
-all: $(BINARIES) $(man_pages)
+all: @executables@ $(man_pages)
 man: $(man_pages)
 tarball: $(tarball)
 
 GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
        @./GIT-VERSION-GEN GIT-VERSION-FILE
 -include GIT-VERSION-FILE
-$(BINARIES): GIT-VERSION-FILE
+@executables@: GIT-VERSION-FILE
 
 -include $(ggo_dir)/makefile
 
index 2ff271b33fd1026c3a4cfe026e49d63b03652cf8..42925592c5061155087e1120ba6321766578d899 100644 (file)
@@ -94,7 +94,7 @@ server_command_list afs_command_list audiod_command_list bitstream imdct wma_afh
 wma_common wmadec_filter buffer_tree
 "
 
-all_executables="server recv filter audioc write client afh audiod"
+executables="server recv filter audioc write client afh audiod"
 
 recv_cmdline_objs="add_cmdline(recv http_recv dccp_recv udp_recv)"
 
@@ -300,8 +300,8 @@ if test "$have_ncurses" = "yes"; then
        AC_SUBST(ncurses_cppflags)
        AC_SUBST(ncurses_libs)
        AC_DEFINE(HAVE_NCURSES, 1, [define to 1 to turn on ncurses support])
-       extras="$extras para_gui"
-       all_executables="$all_executables gui"
+       extras="$extras gui"
+       executables="$executables gui"
 else
        AC_MSG_WARN([cannot build para_gui])
 fi
@@ -509,8 +509,8 @@ have_oss="yes"
 msg="=> will not build para_fade/oss writer"
 
 AC_CHECK_HEADER(sys/soundcard.h, [
-       extras="$extras para_fade"
-       all_executables="$all_executables fade"
+       extras="$extras fade"
+       executables="$executables fade"
        all_errlist_objs="$all_errlist_objs oss_write"
        audiod_errlist_objs="$audiod_errlist_objs oss_write"
        audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(oss_write)"
@@ -577,21 +577,18 @@ CPPFLAGS="$OLD_CPPFLAGS"
 LDFLAGS="$OLD_LDFLAGS"
 LIBS="$OLD_LIBS"
 
-AC_SUBST(extra_binaries, [$extras])
-AC_SUBST(extra_filter_objs, [$extra_filter_objs])
-AC_SUBST(extra_filter_libs, [$extra_filter_libs])
 AC_SUBST(install_sh, [$INSTALL])
 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) }])
-
 ############################################################# error2.h
 AC_DEFUN([define_safe_error_enums],
 [
        exe=""
-       for i in $all_executables; do
+       for i in $executables; do
 #              eval echo checking if $1 is linked into $i
                for j in $(eval echo \$${i}_errlist_objs); do
                        if test $j = $1; then
@@ -674,6 +671,8 @@ AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY,
 )
 
 
+AC_SUBST(executables, add_para($executables))
+
 recv_objs="$recv_cmdline_objs $recv_errlist_objs"
 filter_objs="$filter_cmdline_objs $filter_errlist_objs"
 audiod_objs="$audiod_cmdline_objs $audiod_errlist_objs"