]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Improve config generation style more
authorRoy Marples <roy@marples.name>
Fri, 2 Oct 2009 19:08:59 +0000 (19:08 +0000)
committerRoy Marples <roy@marples.name>
Fri, 2 Oct 2009 19:08:59 +0000 (19:08 +0000)
configure

index ddec7ab00c90ef8e073a6739623083bc65d4019b..590eb1b216196ec9aa525890adbec7b68b125064 100755 (executable)
--- a/configure
+++ b/configure
@@ -80,15 +80,14 @@ echo "# $OS" >$CONFIG_MK
 echo "/* $OS */" >$CONFIG_H
 
 for x in SYSCONFDIR SBINDIR LIBEXECDIR DBDIR RUNDIR; do
+       eval v=\$$x
        # Make files look nice for import
        l=$((10 - ${#x}))
-       if [ $l -gt 2 ]; then
-               t="     "
-       else
-               t=
-       fi
-       eval v=\$$x
+       unset t
+       [ $l -gt 3 ] && t="     "
        echo "$x=$t     $v" >>$CONFIG_MK
+       unset t
+       [ $l -gt 2 ] && t="     "
        echo "#define $x$t      \"$v\"" >>$CONFIG_H
 done
 echo "LIBDIR=          $LIBDIR" >>$CONFIG_MK