[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Out-of-tree builds?
From: |
Yavor Doganov |
Subject: |
Re: Out-of-tree builds? |
Date: |
Tue, 20 Mar 2018 20:45:01 +0000 (UTC) |
User-agent: |
Pan/0.144 (Time is the enemy; 28ab3ba git.gnome.org/pan2) |
В Tue, 20 Mar 2018 13:04:15 +0000, David Chisnall написа:
> For most projects, I would do this by using out-of-tree builds, but
> this doesn’t appear to work for GNUstep. Is there a mechanism for
> doing this that I can’t find, or is it just a limitation of the
> build system?
It is easy to add support for it for any GNUstep project that is using
GNU Autoconf:
- Add GNUmakefile to AC_CONFIG_FILES
- Incorporate all the auxiliary makefiles (.preamble/.postamble/etc)
into the main makefile; alternatively add them to AC_CONFIG_FILES as
well
- Add the following line to the makefile
srcdir := @srcdir@
- Adjust all variables to honor srcdir, for example instead of
foo_OBJC_FILES = foo.m \
bar.m \
maude.m
write
foo_OBJC_FILES = $(addprefix $(srcdir)/, \
bar.m \
maude.m)
Of course all of this should be done automatically and behind the
scenes by GNUstep Make. I fully agree that out-of-tree builds have
many valuable applications and most people quite reasonably expect
this feature. It should work out of the box for any sane build
system.
A different approach would be to play with the vpath GNU make
directive but makefiles must be in builddir in any case.