[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compilation order

From: Alberto Luaces
Subject: Compilation order
Date: Mon, 29 Sep 2008 10:26:56 +0200
User-agent: KMail/1.9.9


isn't it assured that the build of the objects listed on a is made 
in the order of the sources of that file? I have a Fortran convenience 
library to build, so there isn't any dependency mechanism that could 
interfere in the compilation order.

My problem is that this library has its source files split into several 
subdirectories. My first attempt was to list the source files in order in the 
SOURCES variable and to attach a VPATH declaration at the end of the file 
containig the rest of the subdirectories. This compiled well, but 
the "distcheck" target failed because the Makefile couldn't find the sources 
that weren't on the main source directory.

I then removed the VPATH statement and began to write the full path of every 
source file:

libfoo_a_SOURCES = a.f90 $(srcdir)/A/b.f90 $(srcdir)/B/c.f90 ...

However now the compilation fails because make ignores the listing order, even 
it is correct on the Makefile.

I could also write a for every subdirectory, but I don't know if 
this would be an overkill.

Thank you,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]