bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH: tack: Allow echoing of compilation commands


From: Samuel Bronson
Subject: PATCH: tack: Allow echoing of compilation commands
Date: Sun, 26 Feb 2012 17:02:05 -0500

Description: Allow echoing of compilation commands
 Make the abbreviated "make" output optional, defaulting to off.
 .
 Can be turned on by passing the "--disable-echo" flag to configure,
 just like for ncurses (from which some of the code is copied).
Author: Samuel Bronson <address@hidden>

--- tack-1.07.orig/configure.in
+++ tack-1.07/configure.in
@@ -59,7 +59,6 @@ DESTDIR=""                            AC_SUBST(DESTDIR)
 DFT_DEP_SUFFIX=""                      AC_SUBST(DFT_DEP_SUFFIX)
 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`   AC_SUBST(DFT_OBJ_SUBDIR)
 DFT_UPR_MODEL="NORMAL"                 AC_SUBST(DFT_UPR_MODEL)
-ECHO_LINK='@ echo linking $@ ... ;'    AC_SUBST(ECHO_LINK)
 EXTRA_LDFLAGS=""                       AC_SUBST(EXTRA_LDFLAGS)
 LD="ld"                                        AC_SUBST(LD)
 LDFLAGS_SHARED=""                      AC_SUBST(LDFLAGS_SHARED)
@@ -127,6 +126,21 @@ ncurses*)
        ;;
 esac

+###    use option --disable-echo to suppress full display compiling commands
+AC_MSG_CHECKING(if you want to display full commands during build)
+AC_ARG_ENABLE(echo,
+       [  --enable-echo           build: display "compiling" commands
(default)],
+       [with_echo=$enableval],
+       [with_echo=yes])
+if test "$with_echo" = yes; then
+       ECHO_LINK=

+else
+       ECHO_LINK='@ echo linking $@ ... ;'
+       test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
+       test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
+fi
+AC_MSG_RESULT($with_echo)
+AC_SUBST(ECHO_LINK)
 CF_DISABLE_LEAKS

 # look for curses-related headers
@@ -178,14 +192,20 @@ TEST_EOF
 LIST=`sed -e 's/[[     ]].*//' -e '/address@hidden/d' $srcdir/modules`
 for N in $LIST
 do
+       if test "$WITH_ECHO" = yes; then
+               COMPILING=
+       else
+               COMPILING="@echo compiling $N; "
+       fi
        cat >>Makefile <<TEST_EOF

 \$(MODEL)/$N.o : $N.c \\
        tack.h \\
        ncurses_cfg.h
-       @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
+       ${COMPILING}\$(CC) -c \$(CFLAGS_DEFAULT) $N.c
 TEST_EOF
 done
 ],[
 AWK="$AWK"
+WITH_ECHO="$with_echo"
 ],cat)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]