@@ -132,9 +132,9 @@ beautify:
132
132
mkdir $(INDENTBAKSDIR ) /Preprocessor
133
133
mkdir $(INDENTBAKSDIR ) /Swig
134
134
mkdir $(INDENTBAKSDIR ) /Include
135
- (csources=` find $( SOURCE_DIR ) -name " *.c" ` && \
136
- hsources=` find $( SOURCE_DIR ) -name " *.h" ` && \
137
- cxxsources=` find $( SOURCE_DIR ) -name " *.cxx" ` && \
135
+ (csources=` find . -name " *.c" ` && \
136
+ hsources=` find . -name " *.h" ` && \
137
+ cxxsources=` find . -name " *.cxx" ` && \
138
138
for file in $$ csources $$ hsources $$ cxxsources; do \
139
139
$(MAKE ) beautify-file INDENTFILE=$$ file; \
140
140
done ; )
@@ -147,21 +147,3 @@ beautify-file:
147
147
indent -kr --honour-newlines --line-length160 --indent-level2 --braces-on-func-def-line --leave-optional-blank-lines $(SWIGTYPEDEFS ) $(INDENTFILE ) -o $(INDENTFILE ) .tmp;
148
148
cat $(INDENTFILE ) .tmp | sed -e ' s/const const /const /' > $(INDENTFILE ) ;
149
149
rm $(INDENTFILE ) .tmp;
150
-
151
- # Beautify the code using clang-format.
152
- # This works well on both C and C++ code. It requires the LLVM/Clang tools to be installed.
153
- # Single files can be beautified with the format-file target, eg: 'make format-file INDENTFILE=chosenfile.c'
154
-
155
- format :
156
- (csources=` find $( SOURCE_DIR) -name " *.c" ` && \
157
- hsources=` find $( SOURCE_DIR) -name " *.h" ` && \
158
- cxxsources=` find $( SOURCE_DIR) -name " *.cxx" ` && \
159
- for file in $$ csources $$ hsources $$ cxxsources; do \
160
- $(MAKE ) format-file INDENTFILE=$$ file; \
161
- done ; )
162
-
163
-
164
- format-file :
165
- test -n " $( INDENTFILE) " || (echo INDENTFILE not defined && exit 1; )
166
- test -e $(INDENTFILE ) || (echo File does not exist: $( INDENTFILE) && exit 1; )
167
- clang-format -i $(INDENTFILE )
0 commit comments