Note that there are some explanatory texts on larger screens.

plurals
  1. POMakefile: Why can't I see compilation output?
    text
    copied!<p>I have a master <code>Makefile</code> that calls submakefiles inside directories. Those submakefiles are generated by autotools starting from <code>Makefile.am</code> and <code>configure.ac</code> files.</p> <p>The first target of the entire project is a shared library, while the others are executables that link against it (so there is a dependency in the main <code>Makefile</code>).</p> <p>The problem is that I can only see the compilation output of the shared library, while the other projects are just printing warnings and errors (just <code>stderr</code> text, I believe).</p> <p>I can't understand what is causing this behaviour since all the projects are called from the very same rule in the master <code>Makefile</code> and all the submakefiles are autogenerated from very seemed configuration files.</p> <p>The snippet of master <code>Makefile</code> that compiles all the targets looks like this:</p> <pre><code>SUBDIRS = libMylib app1 app2 app3 $(SUBDIRS): $(ECHO) "-&gt; Building $@" $(MAKE) -C $@ $(ECHO) "-&gt; Build of $@ finished." </code></pre> <p>The output of "libMylib" is like:</p> <pre><code>-&gt; Building libMylib libtool: compile: ppc-linux-gcc -DHAVE_CONFIG_H -I. -I/opt/ELDK/ppc_8xx/usr/include/ -I/opt/ELDK/ppc_8xx/include/ -Wall -std=gnu99 -O2 -MT libMylibF1.lo -MD -MP -MF .deps/libMylibF1.Tpo -c libMylibF1.c -fPIC -DPIC -o .libs/libMylibF1.o ... libtool: link: ppc-linux-gcc -shared -fPIC -DPIC .libs/libMylibF1.o .libs/libMylibF2.o .libs/libMylibF3.o -Wl,-rpath -Wl,/opt/ELDK/ppc_8xx/lib -Wl,-rpath -Wl,/opt/ELDK/ppc_8xx/lib -lz -lpthread -O2 -Wl,-soname -Wl,libMylib.so.0 -o .libs/libMylib.so.0.0.0 libtool: link: (cd ".libs" &amp;&amp; rm -f "libMylib.so.0" &amp;&amp; ln -s "libMylib.so.0.0.0" "libawmg.so.0") libtool: link: (cd ".libs" &amp;&amp; rm -f "libMylib.so" &amp;&amp; ln -s "libMylib.so.0.0.0" "libMylib.so") libtool: link: ( cd ".libs" &amp;&amp; rm -f "libMylib.la" &amp;&amp; ln -s "../libMylib.la" "libMylib.la" ) -&gt; Build of libAwmg finished. </code></pre> <p>While the output of any "appN" is:</p> <pre><code>-&gt; Building app1 app1F1.c: In function `app1F1Func1': app1F1.c:161: warning: unused variable `varA' app1F2.c:85: warning: `app1F2FuncX' defined but not used -&gt; Build of app1 finished. </code></pre> <p>Could anyone please help me?</p> <hr> <p>EDIT:</p> <p>I found out that I was able to see the compile stuff in "libMylib" because it is "libtoolized". If I "libtoolize" another project, I can see the linker part of the output (<code>libtool: link:...</code>).</p> <p>So, considering that <code>make</code> calls a shell (<code>sh</code>) for each line in the rule, that $(MAKE) equals to just "make" and, by default, <code>make</code> is verbose, why do the submake is not printing its output to stdout?</p> <p>Which flags may be passed to it so that this happens?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload