[MPlayer-DOCS] CVS: main/DOCS/xml Makefile, 1.16, 1.17 Makefile.inc, 1.13, 1.14

D Richard Felker III dalias at aerifal.cx
Mon Jan 26 00:42:21 CET 2004


On Sun, Jan 25, 2004 at 08:20:11PM +0100, Torinthiel wrote:
> On Sat, Jan 24, 2004 at 11:31:13PM +0100, Diego Biurrun CVS wrote:
> > Update of /cvsroot/mplayer/main/DOCS/xml
> > In directory mail:/tmp/cvs-serv27168
> > 
> > Modified Files:
> > 	Makefile Makefile.inc 
> > Log Message:
> > Make the build system print everything it does.
> > 
> > 
> > Index: Makefile.inc
> > ===================================================================
> > RCS file: /cvsroot/mplayer/main/DOCS/xml/Makefile.inc,v
> > retrieving revision 1.13
> > retrieving revision 1.14
> > diff -u -r1.13 -r1.14
> > --- Makefile.inc	20 Jan 2004 23:27:24 -0000	1.13
> > +++ Makefile.inc	24 Jan 2004 22:31:11 -0000	1.14
> > @@ -37,48 +37,48 @@
> >  html-single: $(HTMLFILE)
> >  
> >  $(HTMLDIR)/index.html: main.xml $(CHUNK_XSL_DEPS)
> > -	@if test "$(HTMLDIR)" = "" ; then \
> > +	if test "$(HTMLDIR)" = "" ; then \
> >  		echo "Error: HTMLDIR not set!!!"; \
> >  		echo "Typically this means, that you've run make from a subdir of DOCS/xml."; \
> >  		echo "Don't do this!"; \
> >  		false; \
> >  	fi
> 
> Wow, this one made me think I made a mistake running make. I don't see
> it as a good idea to leave test for error visible. Especially to see
> error message visible during test.

IMO the correct way is to make a makefile rule that only gets run
under the error condition. I agree it's misleading, but @ is also
misleading. And even with @ you still have the problem if you run make
-n. Ultimately, conditional logic belongs _only_ in the makefile
structure, not in shell commands. Otherwise it's impossible to tell
what will happen by running make -n!

Rich




More information about the MPlayer-DOCS mailing list