Re: [CEDET-devel] How to set up custom compiler?
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2013-03-12 22:38:17
|
On 03/12/2013 03:14 PM, Christoph Piefke wrote: > Am 12.03.2013 02:08, schrieb Eric M. Ludlam: >> On 03/11/2013 03:58 PM, David Engster wrote: >>> Christoph Piefke writes: > Hello David, Eric, > > thank you very much for your help! > > I managed adding ifort to the drop-down-lists in the customize-project > dialogue using your proposal, David. However, running compilation brings > up an error: > > src/Makefile.am: Fortran source seen but `FC' is undefined > src/Makefile.am: The usual way to define `FC' is to add `AC_PROG_FC' > src/Makefile.am: to `configure.ac' and run `autoconf' again. > autoreconf: automake failed with exit status: 1 > > Adding AC_PROG_FC=ifort manually to configure.ac resolves this issue, > but I don't think that this is the desired behaviour, is it? > Unfortunately, just doing a quick search through the ede-code did not > bring up the place where these variables are set. Any suggestions where > I should look at? You can have your compiler automatically add something to autoconf using the :autoconf initializer. Here's an example for gcc: (ede-object-compiler "ede-c-compiler-gcc" :name "gcc" :dependencyvar '("C_DEPENDENCIES" . "-Wp,-MD,.deps/$(*F).P") [ .. snip .. ] :autoconf '("AC_PROG_CC" "AC_PROG_GCC_TRADITIONAL") :sourcetype '(ede-source-c) :objectextention ".o" :makedepends t :uselinker t) "Compiler for C sourcecode.") that will just stick those macros into the autoconf file, and also make sure they aren't stuck in multiple times. I'm not sure about the "=ifort" part. I don't think ede/proj-comp.el accounts for that, but it might just work if you stick it in. > Before you ask, the standard ede-gfortran-compiler option does not work > either. I'd guess that when it was added, the author hand-wrote the autoconf part without realizing it. If you find the solution, we can fix up the F90 version too. > If you want to try it yourself, I put everything I did so far in a git > repository, see git://github.com/cpiefke/f00test.git This was helpful in identifying that you hadn't specified :autoconf rules. Thanks. > <<EDIT>> Suddenly it stopped working and I do not know what I did wrong, > eval-buffer on my ede-f00test.el produces an error: Symbol's function > definition is void: ede-object-compiler > <</EDIT>> You probably need to add a require for ede/proj-comp. > Regarding the implementation of new compilers: I'd prefer David's > solution, providing a set of setter and getter routines for packing > together new combinations of source/compiler/linker in one single file, > which can be published like some sort of plugin to ede. So, other people > could make more use of them, perhaps? > > This brings me to another question: I also have code documented with > doxygen and a accompanying Latex-documentation. Is there a ressource > where doxygen is used with autoconf and perhaps even with ede? And the > same goes with latex. Would you even recommend managing a latex > compilation with ede or would you do this by hand? I've never tried to tie doxygen into an EDE project. I would imagine it would just be another kind of EDE target that would re-use any source files as inputs. If you want to dig into that, I can lend a hand. Particularly in trying to get some tests set up for it. Eric |