New book validation procedure?

M.Canales.es macana at macana-es.com
Sat Jul 7 06:55:31 PDT 2007


El Sábado, 7 de Julio de 2007 15:06, Randy McMurchy escribió:
> Hi all,
>
> This is a question for Manuel, and FYI for everyone else.
>
> There is still a Makefile target of 'validate' in the BLFS book Makefile
> and the commands for this have not changed. However, noted in the
> rendering section of the Makefile, it must first run the Makefile target
> 'validxml', where the first thing is to echo to STDOUT "Validating the
> book...".
>

The "validate" target just validate the XML filis, nothing more, like before.

The "validxml" target is a convenience target added to address two issues: 
make sure that the book sources are valid before processing, and improve 
rendering time when several outputs will be generated at the sane time (e.g, 
"make all")

Both targets do the same: validating the sources. But the second one dump the 
output to a *-full.xml file with Xincludes and entities resolved that is used 
to generate the actual outputs.

>
> And another question (this one because I'm ignorant about Makefiles).
>
> Best I can tell from the Makefile this is how rendering is done:
>
> 1. Run the Makefile target 'blfs'.

When oly "make" is called, the first target is used. Thus a plain "make" is 
the same than "make blfs".

> 2. The 'blfs' target first calls the 'validxml' and 'profile-html' targets.

Yes, it depends on both.

> 3. The 'profile-html' target first calls the 'validxml' target.

Yes. if you want to run only "profile-html" you need be sure that "validxml" 
is run before.

> So, my question is this: how does the 'make' procedure know not to run
> the 'validxml' target twice, once called by the 'blfs' target and again
> by the 'profile-html?

Thats how makefile dependencies works. It first resolve dependencies to know 
in what order each target must be run, removing duplicated ones.


> Shouldn't we clean up the file(s) left in the /tmp directory after the
> completion of the work?

They are placed in the /tmp dir, thus theoreticaly deleted after each reboot. 
And they are overwritten when running againg the target, thus there is no 
need to worry if someone altered they.

That files could be deleted by the Makefile, but I don't see the need to do it 
and could help to track rendering issues.

Actualy I was thinking on make the /tmp directory configurable via a makefile 
envar (like V=1 is for verbose output) to allow the user to select where to 
place that temporaly files.

-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfromscratch.org
LFS en castellano: http://www.escomposlinux.org/lfs-es http://www.lfs-es.info
TLDP-ES:                           http://es.tldp.org



More information about the blfs-dev mailing list