[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
source file in different directory to Makefile and subdir-objects
From: |
Adam Mercer |
Subject: |
source file in different directory to Makefile and subdir-objects |
Date: |
Fri, 19 Jul 2013 14:33:22 -0500 |
Hi
Since updating to automake-1.14 I'm getting warnings of the form:
src/inspiral/posterior/mpi/Makefile.am:14: warning: source file
'$(srcdir)/../LALInferenceMCMC.c' is in a subdirectory,
src/inspiral/posterior/mpi/Makefile.am:14: but option 'subdir-objects'
is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled. For now, the
corresponding output
automake: object file(s) will be placed in the top-level directory. However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same
subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
The Makefile.am in question is (stripping out some stuff to make this clearer):
CC = $(MPICC)
LIBS += $(MPILIBS)
lalinference_mcmc_SOURCES = \
$(srcdir)/../LALInferenceMCMC.c \
$(srcdir)/../LALInferenceMCMCSampler.c \
$(srcdir)/../LALInferenceMCMCSampler.h
bin_PROGRAMS = lalinference_mcmc
This code uses the source files from the parent directory but compiles
them with the MPI C compiler instead of the normal compiler.
The warning above is recommending to set the "subdir-objects" option
but I don't think this is appropriate in this case as we want objects
to be created in the directory that contains the Makefile, not the
source files.
Is there a way to silence this warning?
Cheers
Adam
- source file in different directory to Makefile and subdir-objects,
Adam Mercer <=