Skip to content

Commit 8bbe27e

Browse files
committed
Make it possible to run the tests from a separate build tree.
Make it possible to run the `clang_delta` tests from within a build tree that is separate from the source tree. Mostly, this means using `$<` when referring prerequisites. Note that for `make check-clang-delta` to work, you *still* need to copy `llvm-lit` and `FileCheck` from your LLVM build tree into your LLVM install tree. This commit dosn't change that.
1 parent 10e7aa4 commit 8bbe27e

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

clang_delta/Makefile.am

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@ git_version.cpp: git_version.cpp.in git_version.txt
3131
# we have to manually copy llvm-lit from LLVM's build dir. This is also the
3232
# reason that I didn't create a check-local rule for running clang_delta tests.
3333
# It would fail everywhere else llvm-lit does exist, e.g. travis?
34-
check-clang-delta: tests/lit.site.cfg remove_lit_checks clang_delta
34+
check-clang-delta: tests/lit.site.cfg tests/remove_lit_checks clang_delta
3535
@ echo "--- Running tests for clang_delta ---"
3636
@ $(LLVM_BINDIR)/llvm-lit -sv tests
3737

3838
tests/lit.site.cfg: tests/lit.site.cfg.in
3939
@ echo s=@abs_builddir[@]=$(abs_builddir)=g > lit.site.cfg.tmp
4040
@ echo s=@LLVM_BINDIR[@]=$(LLVM_BINDIR)=g >> lit.site.cfg.tmp
4141
@ echo s=@clang_delta_srcdir@=$(abs_srcdir)=g >> lit.site.cfg.tmp
42-
@ sed -f lit.site.cfg.tmp tests/lit.site.cfg.in > $@
42+
@ sed -f lit.site.cfg.tmp $< > $@
4343
@ rm -f lit.site.cfg.tmp
4444

45-
remove_lit_checks: tests/remove_lit_checks.in
45+
tests/remove_lit_checks: tests/remove_lit_checks.in
4646
@ echo s=@PERL_EXECUTABLE[@]=$(PERL)=g > remove_lit_checks.tmp
47-
@ sed -f remove_lit_checks.tmp tests/remove_lit_checks.in > tests/$@
48-
@ chmod +x tests/$@
47+
@ sed -f remove_lit_checks.tmp $< > $@
48+
@ chmod +x $@
4949
@ rm -f remove_lit_checks.tmp
5050

5151
# When setting `LLVMCXXFLAGS', we weed out command-line options that might be

clang_delta/Makefile.in

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2383,21 +2383,21 @@ git_version.cpp: git_version.cpp.in git_version.txt
23832383
# we have to manually copy llvm-lit from LLVM's build dir. This is also the
23842384
# reason that I didn't create a check-local rule for running clang_delta tests.
23852385
# It would fail everywhere else llvm-lit does exist, e.g. travis?
2386-
check-clang-delta: tests/lit.site.cfg remove_lit_checks clang_delta
2386+
check-clang-delta: tests/lit.site.cfg tests/remove_lit_checks clang_delta
23872387
@ echo "--- Running tests for clang_delta ---"
23882388
@ $(LLVM_BINDIR)/llvm-lit -sv tests
23892389

23902390
tests/lit.site.cfg: tests/lit.site.cfg.in
23912391
@ echo s=@abs_builddir[@]=$(abs_builddir)=g > lit.site.cfg.tmp
23922392
@ echo s=@LLVM_BINDIR[@]=$(LLVM_BINDIR)=g >> lit.site.cfg.tmp
23932393
@ echo s=@clang_delta_srcdir@=$(abs_srcdir)=g >> lit.site.cfg.tmp
2394-
@ sed -f lit.site.cfg.tmp tests/lit.site.cfg.in > $@
2394+
@ sed -f lit.site.cfg.tmp $< > $@
23952395
@ rm -f lit.site.cfg.tmp
23962396

2397-
remove_lit_checks: tests/remove_lit_checks.in
2397+
tests/remove_lit_checks: tests/remove_lit_checks.in
23982398
@ echo s=@PERL_EXECUTABLE[@]=$(PERL)=g > remove_lit_checks.tmp
2399-
@ sed -f remove_lit_checks.tmp tests/remove_lit_checks.in > tests/$@
2400-
@ chmod +x tests/$@
2399+
@ sed -f remove_lit_checks.tmp $< > $@
2400+
@ chmod +x $@
24012401
@ rm -f remove_lit_checks.tmp
24022402

24032403
clean-local:

0 commit comments

Comments
 (0)