From 51db5e120444606c6b3b429d009dff76ef1d9863 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 02:31:29 +0100 Subject: [PATCH] begin makefile cleanup Signed-off-by: Nico Schottelius --- Makefile | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index bd5869d..becd519 100644 --- a/Makefile +++ b/Makefile @@ -22,8 +22,8 @@ # INSTALL=install -CCOLLECT_SOURCE=ccollect.sh -CCOLLECT_DEST=ccollect.sh +CCOLLECT_SOURCE=ccollect +CCOLLECT_DEST=ccollect LN=ln -sf ASCIIDOC=asciidoc DOCBOOKTOTEXI=docbook2x-texi @@ -116,20 +116,28 @@ install-manlink: install-man # # Tools # -TOOLS=ccollect_add_source.sh \ - ccollect_analyse_logs.sh \ - ccollect_delete_source.sh \ - ccollect_list_intervals.sh \ - ccollect_logwrapper.sh \ - ccollect_list_intervals.sh +TOOLS2=ccollect_add_source +TOOLS2 += ccollect_analyse_logs -TOOLSMAN1 = $(subst ccollect,doc/man/ccollect,$(TOOLS)) -TOOLSMAN = $(subst .sh,.text,$(TOOLSMAN1)) +TOOLS=ccollect_add_source \ + ccollect_analyse_logs \ + ccollect_delete_source \ + ccollect_list_intervals \ + ccollect_logwrapper \ + ccollect_list_intervals + +# Stick to posix +TOOLSMAN1 = $(TOOLS:ccollect=doc/man/ccollect) +TOOLSMAN = $(TOOLSMAN1:=.text) TOOLSFP = $(subst ccollect,tools/ccollect,$(TOOLS)) +## FIXME: posix make: shell? => + t2: - echo $(TOOLS) - $(TOOLSMAN) - $(TOOLSFP) + echo $(TOOLS) - $(TOOLSFP) + echo $(TOOLSMAN) + echo $(TOOLSFP) # docbook gets .htm, asciidoc directly .html @@ -191,9 +199,9 @@ dist: distclean documentation /tmp/ccollect: mkdir -p /tmp/ccollect -test: ccollect.sh /tmp/ccollect - cd ./conf/sources/; for s in *; do CCOLLECT_CONF=../ ../../ccollect.sh daily "$$s"; done +test: $(CCOLLECT_SOURCE) /tmp/ccollect + cd ./conf/sources/; for s in *; do CCOLLECT_CONF=../ ../../ccollect daily "$$s"; done touch /tmp/ccollect/$$(ls /tmp/ccollect | head -n1).ccollect-marker - CCOLLECT_CONF=./conf ./ccollect.sh -a daily + CCOLLECT_CONF=./conf ./ccollect -a daily touch /tmp/ccollect/$$(ls /tmp/ccollect | head -n1).ccollect-marker - CCOLLECT_CONF=./conf ./ccollect.sh -a -p daily + CCOLLECT_CONF=./conf ./ccollect -a -p daily