* Martin Kalbfuß wrote on Mon, Sep 21, 2009 at 08:02:54PM CEST: > Now I try to distribute GNU Modula-2 Modules with Autotools. Modula-2 > doesn't use archived static libraries like C does. Instead the object > files are distributed and installed with the definition modules in a > subdirectory of the module directory. Optionally the sources are > installed, too. > > When I want to create a static C library I use lib_LIBRARIES. But how to > install the modules desribed above. > > I have > > *.mod > *.def > > I want to compile
You'll need to write the rules for compilation yourself. > *.o > > And install all of them. No idea where these would belong well. libdir would probably seem best. automake probably forbids you to use lib_DATA, but you can work around it with something like modula_exec_dir = $(libdir) modula_exec_DATA = foo.o ... (the 'exec' part is to get things installed at 'make install-exec' time.) > And install them all in the module directory of the used gm2 compiler. > This is the second point. Which is the best way to find a directory and > set it as the install path for my module files? Well, then forget my above about $(libdir) and instead find out where your compiler looks for them. Then use that directory, I guess. I'd write a configure test that tries to find out from the compiler; or let the user supply one. HTH. Cheers, Ralf