[Top][All Lists]

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

Re: base - build problem in combination with gdl2 (fwd)

From: Nicola Pero
Subject: Re: base - build problem in combination with gdl2 (fwd)
Date: Wed, 9 Oct 2002 12:06:55 +0100 (BST)

---------- Forwarded message ----------
Date: Wed, 9 Oct 2002 12:06:42 +0100 (BST)
From: Nicola Pero <address@hidden>
To: David Ayers <address@hidden>
Cc: Richard Frith-Macdonald <address@hidden>
Subject: Re: base - build problem in combination with gdl2

> Hello Richard,
> since your change in building a local autogsdoc, I can't build base 
> correctly anymore, but I'm not sure where the bug actually is.
> This is my compiler output:
> Making all for doc autogsdoc...
> /opt/GNUstep/System/Makefiles/mkinstalldirs autogsdoc
> ./obj/autogsdox -Project autogsdoc -DocumentationDirectory autogsdoc -Up 
> autogsdoc autogsdoc.m AGSParser.h AGSOutput.h AGSIndex.h AGSHtml.h
> ./obj/autogsdoc: error while loading shared libraries: 
> cannot open shared object file: No such file or 
> directory
> make[2]: *** [generate-autogsdoc] Error 127
> make[1]: *** [autogsdoc.all.doc.variables] Error 2
> make[1]: Leaving directory 
> `/usr/local/src/cvs/gnustep.local/core/base/Tools'
> make: *** [internal-all] Error 2
> I have gdl2 installed this installs a Addition/gdl2.make into the 
> makefile directory.

Which is not quite right :-)

> This make contains:
> AUXILIARY_TOOL_LIBS += -lgnustep-db2 -lgnustep-db2control
> I have it installed in
> /opt/GNUstep/Local/Libraries/ix86/linux-gnu/gnu-gnu-gnu/
> Now I'm not sure how these make files in Additional are supposed to be 
> handled. May be gdl2.make isn't allowed to use the AUXILIARY_TOO_LIBS 
> variable.

gdl2.make shouldn't install a makefile into Additional and setting the
AUXILIARY_TOOL_LIBS, because that will affect *all tools*.

Let me explain a bit :-)

Traditionally, gnustep-database adds a makefile, which you can include if
you so wish, which will add some flags to AUXILIARY_TOOL_LIBS and similar.

So, if you want to compile a tool against gnustep-database, you include
that file.  If you don't want, you don't include that file, and that's it

Makefiles in Additional/ instead are always read, so they must either use
variables which are only used by tools/software wishing to use them (for
example, guile.make sets some GUILE_XXX variables, gui.make sets some
GUI_XXX variables), or add harmless flags (or the extreme case of the base
library, adding flags which everything ObjCish will use).

[Btw, why do I have a back.make setting flags in there ?]

Anyway, there are two solutions:

 1. gdl2.make installs a makefile into $GNUSTEP_MAKEFILES, or maybe I can
create a new directory Auxiliary/ for makefiles like this, to keep things
a little cleaner.  Then, if you want to use gdl2 when compiling something,
you add include $(GNUSTEP_MAKEFILES)/Auxiliary/gdl2.make to your makefile.  

Actually, I quite *like* this option, because if you're using
ProjectCenter, ProjectCenter could scan the makefiles you have in your
system's Auxiliary/, and give you the option to include one of them when
compiling (some sort of 'Add auxiliary makefile' option in a ProjectCenter
menu, which pops up a window allowing you to choose an auxiliary makefile
to include in your project, from the available ones).

If we then agree on some sort of standard way of marking headers in
Auxiliary makefiles (say, the first line contains a comment, with a
description of what the makefile does), ProjectCenter could even read the
header, and present the user with the makefile names and the comment.  
For example, gdl2.make could have the first line be 

# <comment>: Include this makefile to use the gdl2 (gnustep database 2) library

then ProjectCenter would produce a list showing the available auxiliary
makefiles to include, and with each makefile the comment ('Include this
makefile to use the gdl2 (gnustep database 2) library' in the example of

Anyway - I'm just thinking too further :-) but yes it looks quite nice.

2. gdl2.make defines different variables, such as a GDL_TOOL_LIBS; it is
then always included and installed into Additional/, but to use gdl2's
functionality, you need to manually add stuff like 


to your GNUmakefile.  Disadvantages are:

 - gdl2 setup is more hand made (GNUmakefiles are more difficult to write,
and can't easily be automated by ProjectCenter)

 - if gdl2.make changes the flags it needs, you may well need to change
all GNUmakefiles using it

 - if the user has not gdl2 installed, he'll get a link/compile error;
instead with the other solution, he'll get a 'Additional/gdl2.make'
missing error from make - which is more unique of a gdl2 not installed.

Actually, I so much like the first solution, that I'm adding the
$(GNUSTEP_MAKEFILES)/Auxiliary/ directory to gnustep-make.  Please could
you fix gdl2 to install files in there ?  You need to install the
gdl2.make makefile in there, creating the directory if missing (so it
works with older gnustep-make) ... something like

        $(MKINSTALLDIRS) $@

$(GNUSTEP_MAKEFILES)/Auxiliary/gdl2.make: $(GNUSTEP_MAKEFILES)/Auxiliary
        $(INSTALL_DATA) gdl2.make $@

after-install:: $(GNUSTEP_MAKEFILES)/Auxiliary/gdl2.make

reply via email to

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