[PATCH 0/2] Introduce --with-clang-srcdir, to build out-of-tree clang

As same as cmake, clang can be built with out-of-tree clang (for msys).

NAKAMURA Takumi (2):
  test/Makefile: Inspect $(PROJ_OBJ_ROOT)/tools/clang/Makefile instead
    of $(PROJ_SRC_ROOT)/tools/clang for "check-all".
  autoconf: Introduce --with-clang-srcdir, to build out-of-tree clang
    in tools/clang.

Makefile.config.in | 10 +++++++++-
Makefile.rules | 14 ++++++++++----
autoconf/configure.ac | 11 +++++++++++
test/Makefile | 2 +-
4 files changed, 31 insertions(+), 6 deletions(-)

This seems like a bit of a hack. What about changing the parallel directories inside the tools directory to use the passed in autoconf value to specify a clang directory and add that?

Or since the issue is checking out one directory into another just have your build process copy clang into the directory?

-eric

Eric,

This seems like a bit of a hack. What about changing the parallel directories inside the tools directory to use the passed in autoconf value to specify a clang directory and add that?

That might make sense :wink:
I will try Makefile.rules to accept absolute paths in *_DIRS.

Or since the issue is checking out one directory into another just have your build process copy clang into the directory?

For now, I am using the repository for buildbot. In future, I am
planning to use commit/merge/&c.
I would not stand if I had to mirror between tools/clang and another :wink:

Thank you! ...Takumi

Eric,

Here is V2 patch. (squashed into one file).

  - (OPTIONAL_)PARALLEL_DIRS can accept absolute path.
  - tools/Makefile refers to $CLANG_SRC_ROOT

Yeah, I have to hold it till 3.0 branch. :S

...Takumi

clang-srcdir-v2.diff.txt (4.43 KB)

I like that much much more.

Thanks for the rewrite!

If you want to get it through Bill it's with me for 3.0, but if you break something you get to keep all the pieces :slight_smile:

-eric