From 6a3bf18655384cbd534308104d82b1ae0f66c228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 2 Jul 2015 18:35:44 +0200 Subject: Reduce dependency on external programs This commit implements a core_find and core_ls function that can be used to list files recursively or not. A few other minute changes are included and a couple hacks removed. --- plugins/triq.mk | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins/triq.mk') diff --git a/plugins/triq.mk b/plugins/triq.mk index f487f8c..702491d 100644 --- a/plugins/triq.mk +++ b/plugins/triq.mk @@ -12,7 +12,7 @@ define triq_check.erl code:add_pathsa(["$(CURDIR)/ebin", "$(DEPS_DIR)/*/ebin"]), try case $(1) of - all -> [true] =:= lists:usort([triq:check(M) || M <- [$(MODULES)]]); + all -> [true] =:= lists:usort([triq:check(M) || M <- [$(call comma_list,$(3))]]); module -> triq:check($(2)); function -> triq:check($(2)) end @@ -36,8 +36,7 @@ triq: test-build endif else triq: test-build - $(eval MODULES := $(shell find ebin -type f -name \*.beam \ - | sed "s/ebin\//'/;s/\.beam/',/" | sed '$$s/.$$//')) - $(gen_verbose) $(call erlang,$(call triq_check.erl,all,undefined)) + $(eval MODULES := $(patsubst %,'%',$(sort $(notdir $(basename $(wildcard ebin/*.beam)))))) + $(gen_verbose) $(call erlang,$(call triq_check.erl,all,undefined,$(MODULES))) endif endif -- cgit v1.2.3