Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: Makefile.standalone

Issue 372133002: Subzero: Add "make format-diff" target. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Fix paths. Include all .h and .cpp files in "make format". Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 build: 70 build:
71 @mkdir -p $@ 71 @mkdir -p $@
72 72
73 check: llvm2ice 73 check: llvm2ice
74 LLVM_BIN_PATH=$(LLVM_BIN_PATH) \ 74 LLVM_BIN_PATH=$(LLVM_BIN_PATH) \
75 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv tests_lit 75 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv tests_lit
76 (cd crosstest; LLVM_BIN_PATH=$(LLVM_BIN_PATH) ./runtests.sh) 76 (cd crosstest; LLVM_BIN_PATH=$(LLVM_BIN_PATH) ./runtests.sh)
77 77
78 # TODO: Fix the use of wildcards. 78 # TODO: Fix the use of wildcards.
79 # Assumes clang-format is within $PATH.
79 format: 80 format:
80 » $(LLVM_BIN_PATH)/clang-format -style=LLVM -i \ 81 » clang-format -style=LLVM -i src/*.h src/*.cpp
81 » src/Ice*.h src/Ice*.cpp src/llvm2ice.cpp 82
83 # Assumes clang-format-diff.py is within $PATH, and that the
84 # clang-format it calls is also within $PATH. This may require adding
85 # a component to $PATH, or creating symlinks within some existing
86 # $PATH component. Uses the one in /usr/lib/clang-format/ if it
87 # exists.
88 ifeq (,$(wildcard /usr/lib/clang-format/clang-format-diff.py))
89 CLANG_FORMAT_DIFF = clang-format-diff.py
90 else
91 CLANG_FORMAT_DIFF = /usr/lib/clang-format/clang-format-diff.py
92 endif
93 format-diff:
94 » git diff -U0 HEAD^ | \
95 » $(CLANG_FORMAT_DIFF) -p1 -style=LLVM -i
82 96
83 clean: 97 clean:
84 rm -rf llvm2ice *.o build/ 98 rm -rf llvm2ice *.o build/
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698