[LLVMdev] Removing $(LLVM_SRC_ROOT)/autoconf dependensies inStacker, llvm-java [PATCH]

Vladimir Merzliakov wanderer at rsu.ru
Tue Feb 15 02:52:48 PST 2005


> > > Personally, I don't think LLVM projects should need much in the way of
> > > autoconf stuff. They certainly don't need to replicate things like
> > > install-sh and mkinstalldirs. I'd vote for taking these out of the
> > > projects rather than making the makefiles deal with them. I think in
> > > most cases these are just historical artifacts that have been with the
> > > projects since long before the new Makefile.rules of last fall.
> >
> > I agree.
>
> Okay, I'll make that happen :)
>
> > >> llvm/Makefile.config.in have lines:
> > >>
> > >> INSTALL_SH := $(LLVM_SRC_ROOT)/autoconf/install-sh
> > >> MKDIR      := $(LLVM_SRC_ROOT)/autoconf/mkinstalldirs
> > >>
> > >> But all this projects (LLVM, Stacker, sample, llvm-java) have
> > >> autoconf/install-sh and autoconf/mkinstalldirs in own sources.
> > >
> > > Which they probably shouldn't have. I'd vote for removing these files
> > > from the projects.
> >
> > Agreed.  If projects choose to use our makefiles, they can know and use
> > the main copies of these that LLVM provides.
>
> Right.
>
In current state removing this files break $(PROJ_SRC_ROOT)/configure run:
"configure: error: cannot find install-sh or install.sh in autoconf 
../src/autoconf"

> > >> I think at building, for example, llvm-java use
> > >> llvm-java/autoconf/install-sh is more correct (synchronized version 
> > >> with
> > >> other autoconf files and configure in project sources)
> > >
> > > I think that it just leads to confusion. LLVM should provide the core
> > > set of tools (mklib, install-sh, mkinstalldirs, etc.) needed by the
> > > makefile system (since LLVM owns the makefile system). LLVM projects
> > > that want to use this system should use its facilities and not 
> > > override
> > > them. If someone doesn't want to do that, then it shouldn't be 
> > > regarded
> > > as an LLVM project (in the makefile sense).
> >
> > However, projects should continue to be able to have their own configure
> > scripts.  It would be nice if this was optional though! :)
>
> It already is optional. Projects don't even have to have a
> Makefile.config. They just need a Makefile.common that all the sub
> directories include and Makefile.common just needs to pick up llvm's
> Makefile.config and Makefile.rules (via LLVM's Makefile.common).
> The only reason we continue to have configured Makefile.config and
> configure scripts is (a) because the project truly needs configurable
> options or (b) that's just the way the project was before configuration
> was made optional.

Is then installing mklib, install-sh, mkinstalldirs at LLVM install is 
acceptable.

I attempt modify LLVM makefile system and let LLVM projects used installed 
version of LLVM.

My plan:
1) add support installed LLVM version in Makefile.rules
(last patch version in 
http://mail.cs.uiuc.edu/pipermail/llvmdev/2005-February/003331.html
and some comments in 
http://mail.cs.uiuc.edu/pipermail/llvmdev/2005-February/003323.html )

2) shrink of files in LLVM projects using LLVM_(SRC|OBJ)_ROOT paths to only 
really requared
(this patch)

3) install files with LLVM install:
$(LLVM_SRC_ROOT)/Makefile.rules
$(LLVM_SRC_ROOT)/Makefile.common
$(LLVM_OBJ_ROOT)/Makefile.config
$(LLVM_OBJ_ROOT)/mklib
and (if current patch isn't acceptable)
$(LLVM_SRC_ROOT)/authoconf/install-sh
$(LLVM_SRC_ROOT)/authoconf/mkinstalldirs

4)  copy $(LLVM_SRC_ROOT)/Makefile.rules to $(LLVM_OBJ_ROOT)/Makefile.rules 
at LLVM build
and set
LLVM_MAKE_ROOT to LLVM_ROOT or LLVM_OBJ_ROOT

5) add to llvm-java (and for consistency in Stacker and sample) configure.ac 
support --with-llvm option
as alternative to --with-llvmsrc/--with-llvmobj
and add to $(PROJ_SRC_ROOT)/Makefile.common.in code for seting LLVM_ROOT
and add to $(PROJ_SRC_ROOT) using LLVM_MAKE_ROOT instead LLVM_(SRC|OBJ)_ROOT 
paths.

At this point LLVM projects can build using installed LLVM version or only 
build LLVM version.

Vladimir




More information about the llvm-dev mailing list