Subject: Re: BSD .mk files and multiple programs
To: Simon J. Gerraty <sjg@crufty.net>
From: Harlan Stenn <Harlan.Stenn@pfcs.com>
List: tech-userlevel
Date: 11/29/2002 19:50:44
> >Too slow.  My goal (at the moment) is to have Makefile's contain information
> >very similar to an automake's Makefile.am, which means:
> >
> > bin_PROGRAMS = foo1 foo1
> > foo1_SOURCES = ...
> > foo1_CFLAGS = ...
> > foo2_SOURCES = ...
> > foo2_LDADD = ...
> >
> > noinst_LTLIBRARIES = libabc.la libdef.la
> > libabc_la_SOURCES = ...
> > libdef_la_sources = ...	(Needs work - I don't want to require libtool)
> >
> > htmldir = ${Prefix}/share/html
> > html_DATA = index.html
> >
> >and when I "make install" everything gets built and the _PROGRAMS and _DATA
> >targets are properly installed.
> >
> >I believe (but do not know) that using a shell loop to get the variables
> >will be Slow; I suspect I will want to automate a loop that would do
> >something like:
> 
> You don't need to know all the var names.  They are provided for you
> in a couple of well know vars.  

I'm not so sure.  html_DATA, for example, is not known ahead of time.
That's why the "htmldir=..." is needed.

While the primaries are know, the "prefix" says where it will be installed.
And a single makefile may have {bin,sbin,noinst,XXX}_PROGRAMS specified.

XXX can be almost anything, as long as XXXdir=... has been specified.

Furthermore, it is Difficult do define new PRIMARIES {PROGRAMS, DATA,
SCRIPTS, etc.} in automake; I'm looking for a way to make this easier.

And thanks very much - I really appreciate the dialog.

H