From: Andre Noll Date: Sun, 1 Dec 2013 00:13:56 +0000 (+0100) Subject: build: Rewrite objlist_to_errlist(). X-Git-Tag: v0.5.1~1^2~3 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=474d4d8bf17d1c0844f5073de7eace9b743ab820 build: Rewrite objlist_to_errlist(). This function of configure.ac was defined as a single line with 225 characters. Splitting it into three smaller parts makes it readable again. --- diff --git a/configure.ac b/configure.ac index 6fca996e..4dd5c6da 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,21 @@ 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_cmdline],[$(for i in $@; do printf "${i}.cmdline "; 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_DEFUN([make_errlist_defines], \ + $(for i in $@; do \ + printf "DEFINE_ERRLIST($(echo $i | tr 'a-z' 'A-Z'));"; \ + done) \ +) +AC_DEFUN([make_para_errlists], \ + $(for i in $@; do \ + printf "PARA_ERRLIST($(echo $i | tr 'a-z' 'A-Z')), "; \ + done) \ +) +AC_DEFUN([objlist_to_errlist],[ \ + make_errlist_defines($@) \ + [const char **para_errlist[[]]] = {make_para_errlists($@)} \ +]) + AC_PATH_PROG(UNAMEPATH, uname, no) if test "$UNAMEPATH" = "no"; then AC_MSG_ERROR(unable to determine system type)