Jens Seidel schreef:
> On Fri, Jul 18, 2008 at 01:31:59PM +0200, Hendrik Maryns wrote:
>> Jens Seidel schreef:
>>> On Fri, Jul 18, 2008 at 12:15:05PM +0200, Hendrik Maryns wrote:
>>>> So once again: how do you handle this? Are there tricks to separate the
>>>> installation-dependent parts. Note that this even applies for different
>>>> flavors of Linux.
>
>>> To obtain a slight system independence I use environment variables
>>> to refer to include and library paths such as $(CGAL_ROOT)/include.
>> I do this as well, but there I noticed that e.g. $JDK_HOME is defined on
>> openSUSE linux, but not on Ubuntu, so my colleague needs to use LIBS=-I…
>> in her make arguments.
>
> In this case I would suggest to add the default linker (or compiler)
> setting $(USER_FLAGS) to .cproject and let user define this
> variable (outside Eclipse) ...
I do not understand. I never add something to .cproject by hand. I
have a hand-edited Makefile, so the compiler/linker flags are not used.
My setting is the following: in the makefile I have
LIBS = \
-I$(JDK_HOME)/include \
-I$(JDK_HOME)/include/linux
But on Ubuntu, $JDK_HOME is not defined, so she has to change the
default build command to
make LIBS=-I/path/to/her/jdk/include LIBS+=-I/path/to/her/jdk/include/linux
Note that
make "LIBS=-I/path/to/her/jdk/include -I/path/to/her/jdk/include/linux"
is not possible yet (https://bugs.eclipse.org/bugs/show_bug.cgi?id=222390).
But exactly this, the default make command, is stored in .cproject.
Furthermore, I have different makefiles for different platforms, so the
build directory changes between machines as well. I guess it should be
possible to make a cross-platform makefile, but I don’t know how.
> To be honest I did not even understand how to handle config options in
> Eclipse properly. Common options such as for code formatting should be
> reused by all contributers and I noticed indeed that Eclipse sometimes
> writes files in .settings/. Nevertheless the info it writes are not the
> important ones and are probably not handled in my Subversion repository ...
Formatter settings can be exported from the preference page. They are
workspace general (for Java, you can have Project specific formatter
settings), so you would have to store them elsewhere. It is also
possible to export all Eclipse settings (File → Export → General).
H.
--
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
Received on 2008-07-18 16:49:23 CEST