]> git.tue.mpg.de Git - paraslash.git/commitdiff
build: Rewrite objlist_to_errlist().
authorAndre Noll <maan@systemlinux.org>
Sun, 1 Dec 2013 00:13:56 +0000 (01:13 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 1 Dec 2013 11:02:35 +0000 (12:02 +0100)
This function of configure.ac was defined as a single line with 225
characters. Splitting it into three smaller parts makes it readable
again.

configure.ac

index 6fca996e23b8a3e60d9d156141cae6c402cbf2e5..4dd5c6da27d64eba008f7fd7ae5c49ee586c63d5 100644 (file)
@@ -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)