Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

rat check make target #15127

Merged
merged 1 commit into from
Jun 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,26 @@ rclean:
$(RM) -r R-package/src/image_recordio.h R-package/NAMESPACE R-package/man R-package/R/mxnet_generated.R \
R-package/inst R-package/src/*.o R-package/src/*.so mxnet_*.tar.gz

build/rat/apache-rat/target/apache-rat-0.13-SNAPSHOT.jar:
mkdir -p build
svn co http://svn.apache.org/repos/asf/creadur/rat/branches/0.12-release/ build/rat; \
cd build/rat; \
mvn -Dmaven.test.skip=true install;

ratcheck: build/rat/apache-rat/target/apache-rat-0.13-SNAPSHOT.jar
exec 5>&1; \
RAT_JAR=build/rat/apache-rat/target/apache-rat-0.13-SNAPSHOT.jar; \
OUTPUT=$(java -jar $(RAT_JAR) -E tests/nightly/apache_rat_license_check/rat-excludes -d .|tee >(cat - >&5)); \
ERROR_MESSAGE="Printing headers for text files without a valid license header"; \
echo "-------Process The Output-------"; \
if [[ $OUTPUT =~ $ERROR_MESSAGE ]]; then \
echo "ERROR: RAT Check detected files with unknown licenses. Please fix and run test again!"; \
exit 1; \
else \
echo "SUCCESS: There are no files with an Unknown License."; \
fi


ifneq ($(EXTRA_OPERATORS),)
clean: rclean cyclean $(EXTRA_PACKAGES_CLEAN)
$(RM) -r build lib bin deps *~ */*~ */*/*~ */*/*/*~
Expand Down