[Pw_forum] Excess of "Modules" references in the Makefiles

Riccardo Di Meo dimeo at democritos.it
Sat Feb 6 17:52:00 CET 2010


Dear all,

while looking around in the QE directories, I noticed that a *lot* of 
Makefiles link the objects in the Modules directory by pointing at each 
one of them directly, and therefore they require a lot of (probably 
*very* annoying and error-prone) work to be maintained.

Just to give an idea, this is the confirmed list of Makefiles that link 
directly to Modules objects:

upftools/Makefile
GWW/gww/Makefile
pwtools/Makefile
EE/Makefile
atomic/Makefile
VdW/Makefile
D3/Makefile
XSpectra/Makefile
PWCOND/Makefile
PP/Makefile
Gamma/Makefile
GIPAW/Makefile
GWW/head/Makefile
GWW/pw4gww/Makefile
PH/Makefile
PW/Makefile
CPV/Makefile

I would suggest to turn the Modules objects into a static library (as 
for the libpw.a library), and link all applications against it instead: 
this would simplify a lot the maintaining of the software and wouldn't 
require to modify N files every time a module in Modules is changed 
(e.g. renamed) and wouldn't increase the size of the resulting binaries.

The only drawback of this approach (actually not a drawback at all 
imo...) is that all Modules would have to be compiled beforehand, in 
order to compile any executable depending on them, however this would 
simplify *a_lot* the development of QE.

I can personally look into it, if the idea will be considered 
interesting by the developers.

Cheers,
Riccardo





More information about the users mailing list