automake support

H

Thread Starter

hopfgartner

Dear list memebers,

as you probably know, I´m trying to implement a
autoconf/automake build environment for Linuxplc.

In the directory ./lib the libraries liblplc and
liblplc_setup are made from source friles that are located in subdirectories of ./lib.

automake does not like this setup. Thus I can

1) make a library in every subdirectory of ./lib

2) move all files into ./lib

Please let me have your comments,

Peter

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
M

Mario de Sousa

hopfgartner wrote:

> as you probably know, I´m trying to implement a
> autoconf/automake build environment for Linuxplc.
>
> In the directory ./lib the libraries liblplc and
> liblplc_setup are made from source friles that are located
> in subdirectories of ./lib.
>
> automake does not like this setup. Thus I can
>
> 1) make a library in every subdirectory of ./lib

Sure. It is possible to merge them later into a single library, isn't it?

> 2) move all files into ./lib

NO!!!!!

Sorry for shouting, but please don't do the above. We are trying to keep every sub-component of the plc library dependent only on the public
interfaces of the other sub-components. We can still do the above if we have every file under the /lib directory, but it would make things a
little messy. Having things in different sub-directories helps mainly in the mental thought process. If we were using C++, then it would probably be OK...


If my comment to option 1) is also out of the question, then we will have to think it over. Sigh...



Thanks for your help, Peter!


Cheers,

Mario.


--
----------------------------------------------------------------------------
Mario J. R. de Sousa
[email protected]
----------------------------------------------------------------------------

The box said it requires Windows 95 or better, so I installed Linux

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
H
OK, I will look into other packages with automake support to see how they handle this problem and keep you informed about the progress. Certainly there are clean ways to handle this (As said in a previuos message, I'm not an auto-Guru and have still a lot of things to learn about).

Anyway, API-interfaces are handled mainly through headers. If my memories are right, then GTK has 1 library for 1 directory and uses a lot of xxx_private.h headers, as does LinuxPLC.

Is it really wrong to have 1 library per directory?

Should we try to have a small set of libraries, let's say 3-4, that get installed, instead of 2.

Please comment.

Best regards,

Peter

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
M

Mario de Sousa

hopfgartner wrote:
>
> OK, I will look into other packages with automake support to
> see how they handle this problem and keep you informed about
> the progress. Certainly there are clean ways to handle this
> (As said in a previuos message, I'm not an auto-Guru and
> have still a lot of things to learn about).

Yes, it's one of the advantages of helping out with the code. We get to learn stuff! I know I have... ;-)


> Anyway, API-interfaces are handled mainly through headers.
> If my memories are right, then GTK has 1 library for 1
> directory and uses a lot of xxx_private.h headers, as does
> LinuxPLC.
>
> Is it really wrong to have 1 library per directory?

No.

It's just that these sub-directories have a tendency to grow in number as we add features to the MATplc. It would be nice to have a single
library to which the modules have to link to.

Well, to tell the whole truth, we are up to three already:
- one for module runtime;
- another for module setup;
- yet another generic I/O library for modules doing I/O

> Should we try to have a small set of libraries, let's say
> 3-4, that get installed, instead of 2.

3-4 libraries would still be OK, but notice that at the moment we
already have more than that:
- conffile
- cmm
- gmm
- synch
- period
- misc
- io

All the above (except the last two) would really be two libraries (setup and runtime). This would give a grand total of 11 libraries!

If we can't merge the libraries, then we will have to think things over.

Once again, thanks for your input!

Cheers,

Mario.

----------------------------------------------------------------------------
Mario J. R. de Sousa
[email protected]
----------------------------------------------------------------------------

The box said it requires Windows 95 or better, so I installed Linux

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
H
Mario de Sousa <[email protected]> wrote:
> hopfgartner wrote:
> >
> > OK, I will look into other packages with automake
> support to
> > see how they handle this problem and keep you informed
> about
> > the progress. Certainly there are clean ways to handle
> this
> > (As said in a previuos message, I'm not an auto-Guru
> and
> > have still a lot of things to learn about).
>
> Yes, it's one of the advantages of helping out with the
> code. We get to
> learn stuff! I know I have... ;-)

Ok, I had a look at GSL and the way it handles sublibraries. I think that I will be able to handle correctly the current directory layout. No promise, anyway.
(...)

>
> Well, to tell the whole truth, we are up to three
> already:
> - one for module runtime;
> - another for module setup;
> - yet another generic I/O library for modules doing I/O

I will try to build these, as in the current build setup.
(...)

Cheers,

Peter

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
H
On Mon, 08 Oct 2001 15:17:28 +0200
"hopfgartner" <[email protected]> wrote:

The night was short but it seems that the library can be compiled with the current source tree.

Currently I build the liblinuxplc and the liblinuxplc?setup llibraries and can link the executables in loginc/classicladder against them.

If someone would like to see the auto* files let me know, so that I can post them to you.

Now I would like to know where the header files shoud go during a make install. Should we use something like

..../include/lplc
+/cmm
+/log
+/gmm
etc?

Please comment.


I will progressively try to switch one directory after the other to automake and would appreciate if someone would have a look at them. I have to warn you, that I'm progressing very slowly, but currently I have a very heavy work load and I'm restructuring our future appartment. So please be
patient.

Anyway, I propose to commit the whole thing to CVS only when it is completed, since we should be able to build the CVS stuff at any time.

Thank you for your attention,

Peter

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
M

Mario de Sousa

hopfgartner wrote:
>
> On Mon, 08 Oct 2001 15:17:28 +0200
> "hopfgartner" <[email protected]> wrote:
>
> The night was short but it seems that the library can be
> compiled with the current source tree.
>
> Currently I build the liblinuxplc and the liblinuxplc?setup
> llibraries and can link the executables in
> loginc/classicladder against them.
>
> If someone would like to see the auto* files let me know, so
> that I can post them to you.

Great work!

I would, out of curiosity, like to have a look at them.

I am however kind of tied up until the end of the week, so I'll only be glancing through them next week.

> Now I would like to know where the header files shoud go
> during a make install. Should we use something like
>
> ..../include/lplc
> +/cmm
> +/log
> +/gmm
> etc?
>
> Please comment.


Should we install the include files at all?

My first guess is that we should. Remember that the IL compiler generates C code that needs to be compiled. If we don't install the header files, then this won't be transparent.

Where to include them? I don't know. What is common practice among other projects?

Note that if we do install them, normal modules only require the plc.h file (which in turn includes all the others). Maybe we should just place them all in the same subdirectory?


> I will progressively try to switch one directory after the
> other to automake and would appreciate if someone would have
> a look at them. I have to warn you, that I'm progressing
> very slowly, but currently I have a very heavy work load and
> I'm restructuring our future appartment. So please be
> patient.

Like Jiri would say, "no worries". We have no deadlines!

Cheers,
Mario.

----------------------------------------------------------------------------
Mario J. R. de Sousa
[email protected]
----------------------------------------------------------------------------

The box said it requires Windows 95 or better, so I installed Linux

_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
 
Top