Re: [Gnome-devtools] Handling External Dependencies



On Wed, Apr 12, 2000 at 05:47:04PM -0700, Dave Camp wrote:

> Handling external dependencies is basically backend-dependent.  If we
> are using an auto* setup, we're going to handle the dependencies with
> autoconf macros, cflags, and ldflags.  If using a java-based backend,
> it will deal with CLASSPATHs and .class files. 

I'm not sure if they're really that different. In the end, it all comes
down to which compiler flags you give for the compile (and link) stage.

> I was thinking that it would be good to have a set of dependency
> descriptions that could be used to deal with this problem.  They would
> be held in a seperate directory (similar to .gnorba files).  Each
> description would have the following basic form (I'm not an expert at
> xml formats, I apologize for any glaring errors):
> 
> <gbf-dependency name="Bonobo">
>   <description>The Bonobo object model</description>
> 
>   <dependency name="ORBit"/>
>   <dependency name="gnome-libs"/>
> 
>   <information backend="autoconf">
>     <project-info>
>       <!-- per-project autoconf related information -->
>     </project-info>
>     <target-info>
>       <!-- per-target autoconf related info -->
>     </target-info>
>   </information>
> 
>   <!-- any number of different information blocks -->
> </gbf-dependency>
> 
> Use of this form would allow different libraries to be added to
> different backends in a somewhat generic fashion.
> 
> Auto* specific information
> ==========================
> 
> With that said, here are my thoughts on the auto*-specific part
> of the dependency description.
> 
> * Project-level information
> 
> The major project-level information for the auto*-specific backend
> will be configuration info, particularly autoconf stuff.  This will
> consist primarily of two pieces of information:  The necessary
> autoconf macros to insert into the project, as well as a regular
> expression to match an existing autoconf macro.  For example (this is
> a really quick example and could be vastly improved):
> 
> <project-info>
>   <autoconf-macro>
> 	<macro>AM_PATH_BONOBO (%minimum-ver)</macro>
> 	<macro-arg id="minumum-ver" type="string" name="Minimum Version"/>
>   </autoconf-macro>
>   <autoconf-regex>
> 	AM_PATH_BONOBO.*$
>         <!-- probably need a way to map the regex to the macro-args -->
>         <!-- above. -->
>   </autoconf-regex>
>   <autoconf-regex>
>         <!-- there might be more than one form that needs to be 
>         <!-- recognized, so there can be multiple regex blocks -->
>   </autoconf-regex>
> </project-info>
> 

A problem with doing it this way is that the files need to be changed
everytime someone creates a new backend. Maybe it would be possible
to keep the files completely generic, and have the backend deduct
the information on-the-fly

> The stuff in the macro-arg area could easily be mapped to an
> auto-generated UI in the project manager.

Auto-generated UI sucks.


Martijn




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