[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make-system for frameworks
Re: make-system for frameworks
Fri, 25 Oct 2002 17:50:27 +0100 (BST)
Sorry for not answering sooner - the current setup is quite correct in
that it allows different tools to share the same object files.
For example, you might have tool1 and tool2, both contining
common.m. common.m is compiled once into common.o, and is linked into
both tools. It's sort of a basic static library.
It's quite useful at times.
If you need to have separate object files, my suggestion is that you
override the GNUSTEP_OBJ_DIR definition setup by the gnustep-make system
in your own GNUmakefile.
After including common.make, but before including the caompilation
rules,override GNUSTEP_BOJ_DIR :
GNUSTEP_OBJ_DIR := $(GNUSTEP_OBJ_DIR)/AAA
GNUSTEP_OBJ_DIR := $(GNUSTEP_OBJ_DIR)/BBB
> David Ayers wrote:
> > David Ayers wrote:
> >> 2. I need some way of making the objects in derived_src
> >> $(GNUSTEP_INSTANCE)-dependant,. i.e. if I compile GSWFile.m to
> >> GSWFile.o for GSWeb, I don't want that GSWFile.o to be used when I
> >> compile GSWeb_wo.
> > Well actually I meant GNUSTEP_OBJ_DIR but the same would apply for
> > DERIVED_SRC, still looking into that one.
> This is a bit tricky, as GNUSTEP_OBJ_DIR gets set in common.make, but
> since it really isn't needed until actualy compiling (and a clean which
> I though doesn't invoke instances might just clean the GNSTEP_OBJ_PREFIX
> directory, I figured that I'll just move the definition to
> Instance/rules.make. So for testing I introduced GNUSTEP_OBJ_DIR_ROOT
> which is set in common.make to the same value as GNUSTEP_OBJ_DIR was
> originally set. Then in Instance/rules.make I set GNUSTEP_OBJ_DIR =
> $(GNUSTEP_OBJ_DIR_ROOT)/$(GNUSTEP_INSTANCE). (after the targets and
> before the other variables are set.)
> Well make from here resulted in errors do to the target definitions in
> rules.make (notice NO Instance/) which refer to $(GNUSTEP_OBJ_DIR)/5$(OEXT).
> Then "just for fun" I also set GNUSTEP_OBJ_DIR = $(GNUSTEP_OBJ_DIR_ROOT)
> in common.make right after GNUSTEP_OBJ_DIR_ROOT was set. Still my
> Instance/rules.make would override GNUSTEP_OBJ_DIR to append the
> $(GNUSTEP_INSTANCE). I figured that this will probably cause problems as
> the var would have different values in different stages of the make
> process. But alas, this was not so! I actually reuslted in what I
> wanted! Even make clean cleans the
> $(GNUSTEP_OBJ_DIR_ROOT)/$(GNUSTEP_INSTANCE). This behavior is better
> than I expected, as I could clean the projects sepratly now (still using
> ifeq ($(wonames),wo) to set the FRAMEWORK_NAME, but once I get 3 sorted
> out, I take it everything will be cleaned)!
> I'm not quit sure, but I think it would be more correct if these targets
> in rules.make where moved to Instance/rules.make but as it's currently
> working fine for me, I'll wait for your comments on the whole issue.
> (Maybe I'm really breaking something here. Once I'm finished I'll try
> recompling everything with the modified make version.)