Hi Bruce,

Alignment is nice, but in Makefiles, it depends on the <tab> setting. Let's
see an example from your recent commit (I replace tab by spaces enclosed in <>
to be sure you see it as I see it):
---------------
+<     >$(Q)xsltproc --nonet                                    \
+                --stringparam chunk.quietly $(CHUNK_QUIET) \
+                --stringparam rootid "$(ROOT_ID)"          \
+                --stringparam base.dir $(BASEDIR)/         \
+                stylesheets/blfs-chunked.xsl               \
+                $(RENDERTMP)/blfs-html.xml
---------------

The first line needs a <tab>, because of the (silly) Makefile syntax. The
following lines don't. But in order for alignment to be respected for all
lines and for all tab settings, they all need a <tab> at the beginning.
Besides, when the command is displayed (using make V=1), the initial tab is
removed, while initial spaces are not. So a construct like this:
-----------
<      >$(Q)if [ ! -e $(BASEDIR)/stylesheets ]; then \
      mkdir -p $(BASEDIR)/stylesheets;          \
   fi;
-----------
is displayed like this:
-----------
if [ ! -e $(BASEDIR)/stylesheets ]; then \
      mkdir -p $(BASEDIR)/stylesheets;          \
   fi;
----------
which is not what is intended, I guess...
While this:
----------
<      >$(Q)if [ ! -e $(BASEDIR)/stylesheets ]; then \
<      >     mkdir -p $(BASEDIR)/stylesheets;        \
<      >fi;
----------
is displayed like this:
if [ ! -e $(BASEDIR)/stylesheets ]; then \
     mkdir -p $(BASEDIR)/stylesheets;        \
fi
----------
So I'd recommend that you put an initial <tab> in all lines of a command in
Makefile.

Regards
Pierre
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to