whizard is hosted by Hepforge, IPPP Durham

Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#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 Juergen Reuter

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?

comment:2 Changed 8 years ago by Juergen Reuter

Milestone: v2.3.1v2.3.2

comment:3 Changed 8 years ago by Juergen Reuter

Milestone: v2.3.2v2.4.0

Milestone renamed

comment:4 Changed 7 years ago by Juergen Reuter

Milestone: v2.4.0v2.4.1

This was confirmed by TO on the Wuerzburg WHIZARD meeting in 09/2016.

comment:5 Changed 7 years ago by kilian

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 7 years ago by kilian

OK, now I experience the problem, after reconfiguring again. No idea what has changed.

comment:7 Changed 7 years ago by kilian

Status: newassigned

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 7 years ago by kilian

Resolution: fixed
Status: assignedclosed

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.

comment:9 Changed 7 years ago by Juergen Reuter

Milestone: v2.4.1v2.5.0

Milestone renamed

Note: See TracTickets for help on using tickets.