From 8001992607e0173b57989046c2c2488345842847 Mon Sep 17 00:00:00 2001 From: paltherr Date: Sat, 15 Feb 2003 01:03:09 +0000 Subject: - Added wc.mk --- Makefile | 1 + support/make/wc.mk | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 support/make/wc.mk diff --git a/Makefile b/Makefile index f5b6ee9218..aaa7ff40f6 100644 --- a/Makefile +++ b/Makefile @@ -122,6 +122,7 @@ compiler : .latest-compiler include $(ROOT)/support/make/exec.mk include $(ROOT)/support/make/grep.mk +include $(ROOT)/support/make/wc.mk ############################################################################## # JC - compile java files diff --git a/support/make/wc.mk b/support/make/wc.mk new file mode 100644 index 0000000000..476502f2b1 --- /dev/null +++ b/support/make/wc.mk @@ -0,0 +1,40 @@ +############################################################-*-Makefile-*-#### +# WC - Count Bytes, Words and Lines +############################################################################## +# $Id$ + +############################################################################## +# Usage +# +# make wc [FLAGS=] [FILES=]" +# +############################################################################## +# Examples +# +# Count lines in all source files: +# +# make wc +# +# +# Count lines in the compiler source files: +# +# make wc FILES='$(COMPILER_SOURCES)' +# +############################################################################## + +############################################################################## +# Variables + +WC_BINARY ?= $(WC) +WC_FLAGS ?= $(FLAGS) +WC_FILES ?= $(if $(FILES),$(FILES),$(PROJECT_SOURCES)) + +############################################################################## +# Rules + +wc : + @$(WC_BINARY) $(WC_FLAGS) $(WC_FILES) + +.PHONY : wc + +############################################################################## -- cgit v1.2.3