OLD | NEW |
1 # The following variables will likely need to be modified, depending on where | 1 # The following variables will likely need to be modified, depending on where |
2 # and how you built LLVM & Clang. They can be overridden in a command-line | 2 # and how you built LLVM & Clang. They can be overridden in a command-line |
3 # invocation of make, like: | 3 # invocation of make, like: |
4 # | 4 # |
5 # make LLVM_SRC_PATH=<path> LLVM_BIN_PATH=<path> ... | 5 # make LLVM_SRC_PATH=<path> LLVM_BIN_PATH=<path> ... |
6 # | 6 # |
7 | 7 |
8 # LLVM_SRC_PATH is the path to the root of the checked out source code. This | 8 # LLVM_SRC_PATH is the path to the root of the checked out source code. This |
9 # directory should contain the configure script, the include/ and lib/ | 9 # directory should contain the configure script, the include/ and lib/ |
10 # directories of LLVM, Clang in tools/clang/, etc. | 10 # directories of LLVM, Clang in tools/clang/, etc. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 $(OBJS): | build | 83 $(OBJS): | build |
84 | 84 |
85 build: | 85 build: |
86 @mkdir -p $@ | 86 @mkdir -p $@ |
87 | 87 |
88 check-lit: llvm2ice | 88 check-lit: llvm2ice |
89 LLVM_BIN_PATH=$(LLVM_BIN_PATH) \ | 89 LLVM_BIN_PATH=$(LLVM_BIN_PATH) \ |
90 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv tests_lit | 90 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv tests_lit |
91 | 91 |
92 check: check-lit | 92 check: check-lit |
93 » (cd crosstest; LLVM_BIN_PATH=$(LLVM_BIN_PATH) ./runtests.sh) | 93 » (cd crosstest; ./runtests.sh) |
94 | 94 |
95 # TODO: Fix the use of wildcards. | 95 # TODO: Fix the use of wildcards. |
96 # Assumes clang-format is within $PATH. | 96 # Assumes clang-format is within $PATH. |
97 format: | 97 format: |
98 clang-format -style=LLVM -i src/*.h src/*.cpp | 98 clang-format -style=LLVM -i src/*.h src/*.cpp |
99 | 99 |
100 # Assumes clang-format-diff.py is within $PATH, and that the | 100 # Assumes clang-format-diff.py is within $PATH, and that the |
101 # clang-format it calls is also within $PATH. This may require adding | 101 # clang-format it calls is also within $PATH. This may require adding |
102 # a component to $PATH, or creating symlinks within some existing | 102 # a component to $PATH, or creating symlinks within some existing |
103 # $PATH component. Uses the one in /usr/lib/clang-format/ if it | 103 # $PATH component. Uses the one in /usr/lib/clang-format/ if it |
104 # exists. | 104 # exists. |
105 ifeq (,$(wildcard /usr/lib/clang-format/clang-format-diff.py)) | 105 ifeq (,$(wildcard /usr/lib/clang-format/clang-format-diff.py)) |
106 CLANG_FORMAT_DIFF = clang-format-diff.py | 106 CLANG_FORMAT_DIFF = clang-format-diff.py |
107 else | 107 else |
108 CLANG_FORMAT_DIFF = /usr/lib/clang-format/clang-format-diff.py | 108 CLANG_FORMAT_DIFF = /usr/lib/clang-format/clang-format-diff.py |
109 endif | 109 endif |
110 format-diff: | 110 format-diff: |
111 git diff -U0 `git merge-base HEAD master` | \ | 111 git diff -U0 `git merge-base HEAD master` | \ |
112 $(CLANG_FORMAT_DIFF) -p1 -style=LLVM -i | 112 $(CLANG_FORMAT_DIFF) -p1 -style=LLVM -i |
113 | 113 |
114 clean: | 114 clean: |
115 rm -rf llvm2ice *.o build/ | 115 rm -rf llvm2ice *.o build/ |
OLD | NEW |