discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: How do I install header files not in GNUstep Header dirs?


From: Sebastian Reitenbach
Subject: RE: How do I install header files not in GNUstep Header dirs?
Date: Mon, 31 Dec 2007 15:43:36 +0100

Hi,

nicola.pero@meta-innovation.com wrote: 
> Well, you are right that xxx_INSTALL_DIR and xxx_HEADER_FILES_INSTALL_DIR 
are not
> consistent because xxx_INSTALL_DIR is absolute, while 
xxx_HEADER_FILES_INSTALL_DIR
> is relative to GNUSTEP_HEADERS. :-(
> 
> I guess the right solution is to introduce a new variable which is 
absolute to choose
> the header installation dir, and then gnustep-make will use the (old) 
relative or the
> (new) absolute to decide where to install depending on which one is set 
(if both
> are set, we arbitrarily choose one, eg. the absolute one).  We need to 
choose a nice
> name for the new variable though. :-)
> 
> Said that, I'm not sure why you would want to hardcode the installation 
paths in
> your GNUmakefile ?
As there are hardcoded paths in the application objective-c code, not used 
to find the headers, but other stuff. 
But generally I want to provide an option, to install in a more or less 
hardcoded Linux FHS layout, and one that installs into the GNUstep tree.

> 
> Anyway, assuming you have a good reason to do so, for headers there 
currently isn't
> a nice solution to install them into an arbitrary location.  I would 
suggest you
> install them yourself - ie, don't list them in the xxx_HEADER_FILES 
variable (so that
> gnustep-make doesn't install them), and install them manually using an 
after-install
> rule:
> 
> CUSTOM_HEADER_FILES = A.h B.h C.h D.h
> CUSTOM_HEADER_INSTALL_DIR = /usr/local/include
> 
> after-install:
>        $(ECHO_NOTHING)$(MKINSTALLDIRS) 
$(CUSTOM_HEADER_INSTALL_DIR)$(END_ECHO)
>        $(ECHO_NOTHING)for file in $(CUSTOM_HEADER_FILES) __done; do \
>           if [ $$file != __done ]; then \
>             $(INSTALL_DATA) $$file $(CUSTOM_HEADER_INSTALL_DIR)/$$file; \
>           fi; \
>         done$(END_ECHO)
> 
> [I haven't tested the code, so there might be a typo or two, but it should 
work -
> and add a TAB at the beginning of each make command (my email client is 
stripping
> them) ;-)]
But I see what you mean. I wanted to prevent me from doing such "magic" in 
my makefiles.

Would it work when I first include $(GNUSTEP_MAKEFILES)/common.make
And then redefine GNUSTEP_MAKEFILES so that the makefiles installed from my 
GNUmakefile will be installed in the redefined location?

> 
> That looks relatively ugly though, as won't work with other filesystem 
layouts. :-(

Yes, Then I'd prefer to introduce a new VARIABLE that would make it work.
e.g. sth. like this:

<Instance>_HEADER_DIR_ROOT

if defined, it will be used as install target root instead of 
GNUSTEP_HEADERS.

thanks
Sebastian





reply via email to

[Prev in Thread] Current Thread [Next in Thread]