[LLVMdev] Proposed Makefile Changes

Reid Spencer reid at x10sys.com
Fri Jan 14 11:54:10 PST 2005


On Fri, 2005-01-14 at 10:14, Chris Lattner wrote:
> On Fri, 14 Jan 2005, Reid Spencer wrote:

> >     3. The LLVM makefiles require a Makefile.config in the project. I'm
> >        going to try to make that optional because some projects can
> >        just use LLVM's Makefile.config.
> 
> Ok.  Does this mean you want to make the project configure script 
> optional, or just a Makefile.config?  What is the harm in leaving it? 
> Does removing it actually gain anything?

The problem was just a bug in the makefiles. It had a rule that made
project's Makefile.config depend on LLVM's Makefile.config.in which is
obviously broken because it completely thwarted the project's
Makefile.config. 

I thought that for some really small projects, there wouldn't be any
need for a Makefile.config.in or configure scripts since LLVM provides
portability and everything that's needed. It might encourage some
additional users if the cost to getting started was reduced. Basically
they can hand code a Makefile.common and start compiling.  If the
project has a Makefile.config.in then it will assume full autoconf
support (reconfigure target etc.) for the project, otherwise not. Make
sense?

> >     5. Some of the names of the directives are a little confusing. We
> >        have BUILD_ARCHIVE to specify building an archive. But, we have
> >        SHARED_LIBRARY to specify building a shared library. I think
> >        these should all be named BUILD_<thing_to_build> so we'd have
> >        BUILD_ARCHIVE_LIBRARY and BUILD_SHARED_LIBRARY and
> >        BUILD_RELINKD_LIBRARY and BUILD_TOOL
> 
> I would also like to see this happen, but it's a big change.  I suspect 
> that people running projects would prefer to not change all of these.

Yes, I know. I think what I'll do is support both names temporarily with
a make "warning" to caution the user to change the names, if the old
names are used.  That way it doesn't break but its just annoying enough
that it might provide the impetus for project owners to update the
variable names.

> >     7. The documentation in MakefileGuide.html is lacking a tutorial on
> >        how to use the LLVM Makefile system for projects (as opposed to
> >        LLVM itself).  I think its time to add one. There are things in
> >        the configure.ac file that are needed to support the makefile
> >        system. Those need to be documented as well.
> 
> There is some information here:
> http://llvm.cs.uiuc.edu/docs/Projects.html
> 
> But it's not really a tutorial.  A tutorial would be great to have, but we 
> should figure out the relationship between these two docs.

Okay, forgot about Projects.html. I think I will leave
MakefileGuide.html as the "reference" manual and place the more
descriptive and project-focused tutorial into Projects.html.

Make sense?

> If you make these changes, please make sure to send instructions for 
> exactly what needs to be done to update projects.  These kinds of things 
> can lead to all sorts of obscure problems for those who aren't experts in 
> the build system...

I will. And I'll try to be as backward-compatible as possible.

Reid
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050114/120c2343/attachment.sig>


More information about the llvm-dev mailing list