[bootlin/training-materials updates] master: sysdev: labs: fix indentation of long command (02ce4259)

Luca Ceresoli luca.ceresoli at bootlin.com
Thu Feb 16 12:47:54 CET 2023


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/02ce425937787d24115e76b5ffdc8f5ad1606667

>---------------------------------------------------------------

commit 02ce425937787d24115e76b5ffdc8f5ad1606667
Author: Luca Ceresoli <luca.ceresoli at bootlin.com>
Date:   Thu Feb 16 11:06:31 2023 +0100

    sysdev: labs: fix indentation of long command
    
    The line with "ac_cv_func_malloc_0_nonnull=yes" overflows in a bad way, resulting in:
    
      $ ac_cv_func_malloc_0_nonnull=yes CC=arm-linux-gcc ./configure --host=arm-linux --prefix
      =/usr --enable-tools
    
    Avoid this issue by switching to bashinput.
    
    While there, also switch to bashinput the other long-ish lines in the same
    section, even though they currently don't overflow, both to keep coding
    style uniform and in case of future changes, especially related to
    expanding __SESSION_NAME__.
    
    Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>


>---------------------------------------------------------------

02ce425937787d24115e76b5ffdc8f5ad1606667
 labs/sysdev-thirdparty-bbb/sysdev-thirdparty-bbb.tex     | 12 +++++++++---
 labs/sysdev-thirdparty-stm32/sysdev-thirdparty-stm32.tex | 12 +++++++++---
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/labs/sysdev-thirdparty-bbb/sysdev-thirdparty-bbb.tex b/labs/sysdev-thirdparty-bbb/sysdev-thirdparty-bbb.tex
index 0a49c55d..166198e3 100644
--- a/labs/sysdev-thirdparty-bbb/sysdev-thirdparty-bbb.tex
+++ b/labs/sysdev-thirdparty-bbb/sysdev-thirdparty-bbb.tex
@@ -637,7 +637,9 @@ executables that we want.
 As this project doesn't have any external library dependency, let's
 configure {\em libgpiod} in a similar way as {\em alsa-utils}:
 
-\bashcmd{$ CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr --enable-tools}
+\begin{bashinput}
+$ CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr --enable-tools
+\end{bashinput}
 
 Now, compile the software:
 
@@ -649,12 +651,16 @@ requires running a test program, which doesn't work when
 cross-compiling. We can preseed the result of this test by passing
 \code{ac_cv_func_malloc_0_nonnull=yes}:
 
-\bashcmd{$ ac_cv_func_malloc_0_nonnull=yes CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr --enable-tools}
+\begin{bashinput}
+$ ac_cv_func_malloc_0_nonnull=yes CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr --enable-tools
+\end{bashinput}
 
 Installation to the {\em staging} space can be done using the
 classical \code{DESTDIR} mechanism:
 
-\bashcmd{$ make DESTDIR=$HOME/__SESSION_NAME__-labs/thirdparty/staging/ install}
+\begin{bashinput}
+$ make DESTDIR=$HOME/__SESSION_NAME__-labs/thirdparty/staging/ install
+\end{bashinput}
 
 And finally, only manually install and strip the files
 needed at runtime in the {\em target} space:
diff --git a/labs/sysdev-thirdparty-stm32/sysdev-thirdparty-stm32.tex b/labs/sysdev-thirdparty-stm32/sysdev-thirdparty-stm32.tex
index 18c6a6e4..3eb42e92 100644
--- a/labs/sysdev-thirdparty-stm32/sysdev-thirdparty-stm32.tex
+++ b/labs/sysdev-thirdparty-stm32/sysdev-thirdparty-stm32.tex
@@ -637,7 +637,9 @@ executables that we want.
 As this project doesn't have any external library dependency, let's
 configure {\em libgpiod} in a similar way as {\em alsa-utils}:
 
-\bashcmd{$ CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr --enable-tools}
+\begin{bashinput}
+$ CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr --enable-tools
+\end{bashinput}
 
 Now, compile the software:
 
@@ -649,12 +651,16 @@ requires running a test program, which doesn't work when
 cross-compiling. We can preseed the result of this test by passing
 \code{ac_cv_func_malloc_0_nonnull=yes}:
 
-\bashcmd{$ ac_cv_func_malloc_0_nonnull=yes CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr --enable-tools}
+\begin{bashinput}
+$ ac_cv_func_malloc_0_nonnull=yes CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr --enable-tools
+\end{bashinput}
 
 Installation to the {\em staging} space can be done using the
 classical \code{DESTDIR} mechanism:
 
-\bashcmd{$ make DESTDIR=$HOME/__SESSION_NAME__-labs/thirdparty/staging/ install}
+\begin{bashinput}
+make DESTDIR=$HOME/__SESSION_NAME__-labs/thirdparty/staging/ install
+\end{bashinput}
 
 And finally, only manually install and strip the files
 needed at runtime in the {\em target} space:




More information about the training-materials-updates mailing list