#794 closed defect (fixed)
Build logic in omega/src broken
Reported by: | Juergen Reuter | Owned by: | kilian |
---|---|---|---|
Priority: | P3 | Milestone: | v2.5.0 |
Component: | core | Version: | 2.2.8 |
Severity: | normal | Keywords: | |
Cc: |
Description
If omegalib.nw is edited, then a make command in the WHIZARD main build directory only unpacks the .f90 files from omegalib.nw but doesn't compile them:
Making all in omega make[1]: Entering directory `/home/reuter/local/packages/whizard/trunk/build_nag_nopythia/omega' Making all in src make[2]: Entering directory `/home/reuter/local/packages/whizard/trunk/build_nag_nopythia/omega/src' for src in omega_spinors.f90 omega_bispinors.f90 omega_vectors.f90 omega_vectorspinors.f90 omega_tensors.f90 omega_couplings.f90 omega_spinor_couplings.f90 omega_bispinor_couplings.f90 omega_polarizations.f90 omega_polarizations_madgraph.f90 omega_tensor_polarizations.f90 omega_vspinor_polarizations.f90 omega_color.f90 omega_utils.f90 omega95.f90 omega95_bispinors.f90 omegavm95.f90; do \ /usr/bin/notangle -R[[$src]] ../../../omega/src/omegalib.nw | /usr/bin/cpif $src; \ done make[2]: Leaving directory `/home/reuter/local/packages/whizard/trunk/build_nag_nopythia/omega/src'
but if the make command is executed in build/omega/src or in build/omega then also libomega.la etc. is newly built. Seems like an intricate trap of Makefile logic for subdirectories!?
Change History (9)
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
Milestone: | v2.3.1 → v2.3.2 |
---|
comment:4 Changed 8 years ago by
Milestone: | v2.4.0 → v2.4.1 |
---|
This was confirmed by TO on the Wuerzburg WHIZARD meeting in 09/2016.
comment:5 Changed 8 years ago by
I can't reproduce the issue.
Any modification of omegalib.nw inside a Fortran code chunks triggers a compilation cascade, when I execute make from the top directory. Exactly as intended.
Are you sure that you modified the file inside a code chunk?
comment:6 Changed 8 years ago by
OK, now I experience the problem, after reconfiguring again. No idea what has changed.
comment:7 Changed 8 years ago by
Status: | new → assigned |
---|
However, the behavior is now the same regardless where make is executed. Recompilation is always triggered on the second pass only.
It appears to be Makefile.depend_fortran which is rebuilt in the first pass and triggers recompilation in the second pass.
comment:8 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed.
In the 'stamp' part of the Makefile(.am), lines were interchanged w.r.t the analogous part in the Whizard source Makefiles. In effect, one dependency for the .f90 files was missing, the stamp was not updated in the first pass, and thus recompilation was triggered only in a second pass.
Forgot to mention that a second make in the WHIZARD build directory then does the actual recompilation. But it has to be done manually.
My suspicion is that maybe the AUTOMAKE_OPTIONS = no-dependencies in omega/Makefile.am is responsible for this. This tells make that we do our own dependency tracking. This might be overridden from the WHIZARD main makefile as it is not set there. (And rightfully so as we do have C and C++ code in WHIZARD for which we want to use the automatic dependency tracking of autotools). Could it be that there is a rule that is ignored because dependency-tracking is not switched off?