aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2024-11-19 14:41:14 +0100
committerLoïc Hoguin <[email protected]>2024-11-19 15:34:48 +0100
commite507a7c03f54b26cf92f1c98e9ed2e52062eb256 (patch)
tree4d7168d28118e270af89e261d90315316a1f4164
parentacce7040d442a5ddba9f9394714ad28877905ea0 (diff)
downloaderlang.mk-e507a7c03f54b26cf92f1c98e9ed2e52062eb256.tar.gz
erlang.mk-e507a7c03f54b26cf92f1c98e9ed2e52062eb256.tar.bz2
erlang.mk-e507a7c03f54b26cf92f1c98e9ed2e52062eb256.zip
Use short variable names when possible
We use $1 instead of $(1) or $p instead of $(p) when possible, except when building variable names (pkg_$(p)_name for example, but also $(dep_fetch_$(1))).
-rw-r--r--core/core.mk14
-rw-r--r--core/deps-tools.mk16
-rw-r--r--core/deps.mk116
-rw-r--r--core/erlc.mk14
-rw-r--r--core/index.mk8
-rw-r--r--core/kerl.mk6
-rw-r--r--core/test.mk2
-rw-r--r--plugins/ci.mk2
8 files changed, 89 insertions, 89 deletions
diff --git a/core/core.mk b/core/core.mk
index dde4f86..22ea935 100644
--- a/core/core.mk
+++ b/core/core.mk
@@ -47,7 +47,7 @@ verbose_0 = @
verbose_2 = set -x;
verbose = $(verbose_$(V))
-ifeq ($(V),3)
+ifeq ($V,3)
SHELL := $(SHELL) -x
endif
@@ -162,7 +162,7 @@ define newline
endef
define comma_list
-$(subst $(space),$(comma),$(strip $(1)))
+$(subst $(space),$(comma),$(strip $1))
endef
define escape_dquotes
@@ -180,23 +180,23 @@ else
core_native_path = $1
endif
-core_http_get = curl -Lf$(if $(filter-out 0,$(V)),,s)o $(call core_native_path,$1) $2
+core_http_get = curl -Lf$(if $(filter-out 0,$V),,s)o $(call core_native_path,$1) $2
-core_eq = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
+core_eq = $(and $(findstring $1,$2),$(findstring $2,$1))
# We skip files that contain spaces because they end up causing issues.
# Files that begin with a dot are already ignored by the wildcard function.
core_find = $(foreach f,$(wildcard $(1:%/=%)/*),$(if $(wildcard $f/.),$(call core_find,$f,$2),$(if $(filter $(subst *,%,$2),$f),$(if $(wildcard $f),$f))))
-core_lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$(1)))))))))))))))))))))))))))
+core_lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1))))))))))))))))))))))))))
-core_ls = $(filter-out $(1),$(shell echo $(1)))
+core_ls = $(filter-out $1,$(shell echo $1))
# @todo Use a solution that does not require using perl.
core_relpath = $(shell perl -e 'use File::Spec; print File::Spec->abs2rel(@ARGV) . "\n"' $1 $2)
define core_render
- printf -- '$(subst $(newline),\n,$(subst %,%%,$(subst ','\'',$(subst $(tab),$(WS),$(call $(1))))))\n' > $(2)
+ printf -- '$(subst $(newline),\n,$(subst %,%%,$(subst ','\'',$(subst $(tab),$(WS),$(call $1)))))\n' > $2
endef
# Automated update.
diff --git a/core/deps-tools.mk b/core/deps-tools.mk
index 262d045..47f3b8e 100644
--- a/core/deps-tools.mk
+++ b/core/deps-tools.mk
@@ -107,14 +107,14 @@ list-deps list-doc-deps list-rel-deps list-test-deps list-shell-deps:
QUERY ?= name fetch_method repo version
define query_target
-$(1): $(2) clean-tmp-query.log
+$1: $2 clean-tmp-query.log
ifeq ($(IS_APP)$(IS_DEP),)
- $(verbose) rm -f $(4)
+ $(verbose) rm -f $4
endif
- $(verbose) $(foreach dep,$(3),\
- echo $(PROJECT): $(foreach q,$(QUERY),$(call query_$(q),$(dep))) >> $(4) ;)
- $(if $(filter-out query-deps,$(1)),,\
- $(verbose) set -e; for dep in $(3) ; do \
+ $(verbose) $(foreach dep,$3,\
+ echo $(PROJECT): $(foreach q,$(QUERY),$(call query_$(q),$(dep))) >> $4 ;)
+ $(if $(filter-out query-deps,$1),,\
+ $(verbose) set -e; for dep in $3 ; do \
if grep -qs ^$$$$dep$$$$ $(ERLANG_MK_TMP)/query.log; then \
:; \
else \
@@ -123,8 +123,8 @@ endif
fi \
done)
ifeq ($(IS_APP)$(IS_DEP),)
- $(verbose) touch $(4)
- $(verbose) cat $(4)
+ $(verbose) touch $4
+ $(verbose) cat $4
endif
endef
diff --git a/core/deps.mk b/core/deps.mk
index fdcf866..310db80 100644
--- a/core/deps.mk
+++ b/core/deps.mk
@@ -44,12 +44,12 @@ endef
# They both use the core_dep_plugin macro.
define core_dep_plugin
-ifeq ($(2),$(PROJECT))
--include $$(patsubst $(PROJECT)/%,%,$(1))
+ifeq ($2,$(PROJECT))
+-include $$(patsubst $(PROJECT)/%,%,$1)
else
--include $(DEPS_DIR)/$(1)
+-include $(DEPS_DIR)/$1
-$(DEPS_DIR)/$(1): $(DEPS_DIR)/$(2) ;
+$(DEPS_DIR)/$1: $(DEPS_DIR)/$2 ;
endif
endef
@@ -62,42 +62,42 @@ $(foreach p,$(DEP_EARLY_PLUGINS),\
# Query functions.
-query_fetch_method = $(if $(dep_$(1)),$(call _qfm_dep,$(word 1,$(dep_$(1)))),$(call _qfm_pkg,$(1)))
-_qfm_dep = $(if $(dep_fetch_$(1)),$(1),fail)
+query_fetch_method = $(if $(dep_$(1)),$(call _qfm_dep,$(word 1,$(dep_$(1)))),$(call _qfm_pkg,$1))
+_qfm_dep = $(if $(dep_fetch_$(1)),$1,fail)
_qfm_pkg = $(if $(pkg_$(1)_fetch),$(pkg_$(1)_fetch),fail)
-query_name = $(if $(dep_$(1)),$(1),$(if $(pkg_$(1)_name),$(pkg_$(1)_name),$(1)))
+query_name = $(if $(dep_$(1)),$1,$(if $(pkg_$(1)_name),$(pkg_$(1)_name),$1))
-query_repo = $(call _qr,$(1),$(call query_fetch_method,$(1)))
-_qr = $(if $(query_repo_$(2)),$(call query_repo_$(2),$(1)),$(call query_repo_git,$(1)))
+query_repo = $(call _qr,$1,$(call query_fetch_method,$1))
+_qr = $(if $(query_repo_$(2)),$(call query_repo_$(2),$1),$(call query_repo_git,$1))
query_repo_default = $(if $(dep_$(1)),$(word 2,$(dep_$(1))),$(pkg_$(1)_repo))
-query_repo_git = $(patsubst git://github.com/%,https://github.com/%,$(call query_repo_default,$(1)))
-query_repo_git-subfolder = $(call query_repo_git,$(1))
+query_repo_git = $(patsubst git://github.com/%,https://github.com/%,$(call query_repo_default,$1))
+query_repo_git-subfolder = $(call query_repo_git,$1)
query_repo_git-submodule = -
-query_repo_hg = $(call query_repo_default,$(1))
-query_repo_svn = $(call query_repo_default,$(1))
-query_repo_cp = $(call query_repo_default,$(1))
-query_repo_ln = $(call query_repo_default,$(1))
-query_repo_hex = https://hex.pm/packages/$(if $(word 3,$(dep_$(1))),$(word 3,$(dep_$(1))),$(1))
+query_repo_hg = $(call query_repo_default,$1)
+query_repo_svn = $(call query_repo_default,$1)
+query_repo_cp = $(call query_repo_default,$1)
+query_repo_ln = $(call query_repo_default,$1)
+query_repo_hex = https://hex.pm/packages/$(if $(word 3,$(dep_$(1))),$(word 3,$(dep_$(1))),$1)
query_repo_fail = -
-query_version = $(call _qv,$(1),$(call query_fetch_method,$(1)))
-_qv = $(if $(query_version_$(2)),$(call query_version_$(2),$(1)),$(call query_version_default,$(1)))
+query_version = $(call _qv,$1,$(call query_fetch_method,$1))
+_qv = $(if $(query_version_$(2)),$(call query_version_$(2),$1),$(call query_version_default,$1))
query_version_default = $(if $(dep_$(1)_commit),$(dep_$(1)_commit),$(if $(dep_$(1)),$(word 3,$(dep_$(1))),$(pkg_$(1)_commit)))
-query_version_git = $(call query_version_default,$(1))
-query_version_git-subfolder = $(call query_version_default,$(1))
+query_version_git = $(call query_version_default,$1)
+query_version_git-subfolder = $(call query_version_default,$1)
query_version_git-submodule = -
-query_version_hg = $(call query_version_default,$(1))
+query_version_hg = $(call query_version_default,$1)
query_version_svn = -
query_version_cp = -
query_version_ln = -
query_version_hex = $(if $(dep_$(1)_commit),$(dep_$(1)_commit),$(if $(dep_$(1)),$(word 2,$(dep_$(1))),$(pkg_$(1)_commit)))
query_version_fail = -
-query_extra = $(call _qe,$(1),$(call query_fetch_method,$(1)))
-_qe = $(if $(query_extra_$(2)),$(call query_extra_$(2),$(1)),-)
+query_extra = $(call _qe,$1,$(call query_fetch_method,$1))
+_qe = $(if $(query_extra_$(2)),$(call query_extra_$(2),$1),-)
query_extra_git = -
query_extra_git-subfolder = $(if $(dep_$(1)),subfolder=$(word 4,$(dep_$(1))),-)
@@ -109,11 +109,11 @@ query_extra_ln = -
query_extra_hex = $(if $(dep_$(1)),package-name=$(word 3,$(dep_$(1))),-)
query_extra_fail = -
-query_absolute_path = $(addprefix $(DEPS_DIR)/,$(call query_name,$(1)))
+query_absolute_path = $(addprefix $(DEPS_DIR)/,$(call query_name,$1))
# Application directories.
-LOCAL_DEPS_DIRS = $(foreach a,$(LOCAL_DEPS),$(if $(wildcard $(APPS_DIR)/$(a)),$(APPS_DIR)/$(a)))
+LOCAL_DEPS_DIRS = $(foreach a,$(LOCAL_DEPS),$(if $(wildcard $(APPS_DIR)/$a),$(APPS_DIR)/$a))
ALL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(foreach dep,$(filter-out $(IGNORE_DEPS),$(BUILD_DEPS) $(DEPS)),$(call query_name,$(dep))))
# When we are calling an app directly we don't want to include it here
@@ -236,25 +236,25 @@ endif
# While Makefile file could be GNUmakefile or makefile,
# in practice only Makefile is needed so far.
define dep_autopatch
- if [ -f $(DEPS_DIR)/$(1)/erlang.mk ]; then \
+ if [ -f $(DEPS_DIR)/$1/erlang.mk ]; then \
rm -rf $(DEPS_DIR)/$1/ebin/; \
- $(call erlang,$(call dep_autopatch_appsrc.erl,$(1))); \
- $(call dep_autopatch_erlang_mk,$(1)); \
- elif [ -f $(DEPS_DIR)/$(1)/Makefile ]; then \
+ $(call erlang,$(call dep_autopatch_appsrc.erl,$1)); \
+ $(call dep_autopatch_erlang_mk,$1); \
+ elif [ -f $(DEPS_DIR)/$1/Makefile ]; then \
if [ -f $(DEPS_DIR)/$1/rebar.lock ]; then \
$(call dep_autopatch2,$1); \
- elif [ 0 != `grep -c "include ../\w*\.mk" $(DEPS_DIR)/$(1)/Makefile` ]; then \
- $(call dep_autopatch2,$(1)); \
- elif [ 0 != `grep -ci "^[^#].*rebar" $(DEPS_DIR)/$(1)/Makefile` ]; then \
- $(call dep_autopatch2,$(1)); \
- elif [ -n "`find $(DEPS_DIR)/$(1)/ -type f -name \*.mk -not -name erlang.mk -exec grep -i "^[^#].*rebar" '{}' \;`" ]; then \
- $(call dep_autopatch2,$(1)); \
+ elif [ 0 != `grep -c "include ../\w*\.mk" $(DEPS_DIR)/$1/Makefile` ]; then \
+ $(call dep_autopatch2,$1); \
+ elif [ 0 != `grep -ci "^[^#].*rebar" $(DEPS_DIR)/$1/Makefile` ]; then \
+ $(call dep_autopatch2,$1); \
+ elif [ -n "`find $(DEPS_DIR)/$1/ -type f -name \*.mk -not -name erlang.mk -exec grep -i "^[^#].*rebar" '{}' \;`" ]; then \
+ $(call dep_autopatch2,$1); \
fi \
else \
- if [ ! -d $(DEPS_DIR)/$(1)/src/ ]; then \
- $(call dep_autopatch_noop,$(1)); \
+ if [ ! -d $(DEPS_DIR)/$1/src/ ]; then \
+ $(call dep_autopatch_noop,$1); \
else \
- $(call dep_autopatch2,$(1)); \
+ $(call dep_autopatch2,$1); \
fi \
fi
endef
@@ -264,19 +264,19 @@ define dep_autopatch2
mv -n $(DEPS_DIR)/$1/ebin/$1.app $(DEPS_DIR)/$1/src/$1.app.src; \
rm -f $(DEPS_DIR)/$1/ebin/$1.app; \
if [ -f $(DEPS_DIR)/$1/src/$1.app.src.script ]; then \
- $(call erlang,$(call dep_autopatch_appsrc_script.erl,$(1))); \
+ $(call erlang,$(call dep_autopatch_appsrc_script.erl,$1)); \
fi; \
- $(call erlang,$(call dep_autopatch_appsrc.erl,$(1))); \
- if [ -f $(DEPS_DIR)/$(1)/rebar -o -f $(DEPS_DIR)/$(1)/rebar.config -o -f $(DEPS_DIR)/$(1)/rebar.config.script -o -f $(DEPS_DIR)/$1/rebar.lock ]; then \
+ $(call erlang,$(call dep_autopatch_appsrc.erl,$1)); \
+ if [ -f $(DEPS_DIR)/$1/rebar -o -f $(DEPS_DIR)/$1/rebar.config -o -f $(DEPS_DIR)/$1/rebar.config.script -o -f $(DEPS_DIR)/$1/rebar.lock ]; then \
$(call dep_autopatch_fetch_rebar); \
- $(call dep_autopatch_rebar,$(1)); \
+ $(call dep_autopatch_rebar,$1); \
else \
- $(call dep_autopatch_gen,$(1)); \
+ $(call dep_autopatch_gen,$1); \
fi
endef
define dep_autopatch_noop
- printf "noop:\n" > $(DEPS_DIR)/$(1)/Makefile
+ printf "noop:\n" > $(DEPS_DIR)/$1/Makefile
endef
# Replace "include erlang.mk" with a line that will load the parent Erlang.mk
@@ -298,7 +298,7 @@ endif
define dep_autopatch_gen
printf "%s\n" \
"ERLC_OPTS = +debug_info" \
- "include ../../erlang.mk" > $(DEPS_DIR)/$(1)/Makefile
+ "include ../../erlang.mk" > $(DEPS_DIR)/$1/Makefile
endef
# We use flock/lockf when available to avoid concurrency issues.
@@ -323,11 +323,11 @@ define dep_autopatch_fetch_rebar2
endef
define dep_autopatch_rebar
- if [ -f $(DEPS_DIR)/$(1)/Makefile ]; then \
- mv $(DEPS_DIR)/$(1)/Makefile $(DEPS_DIR)/$(1)/Makefile.orig.mk; \
+ if [ -f $(DEPS_DIR)/$1/Makefile ]; then \
+ mv $(DEPS_DIR)/$1/Makefile $(DEPS_DIR)/$1/Makefile.orig.mk; \
fi; \
- $(call erlang,$(call dep_autopatch_rebar.erl,$(1))); \
- rm -f $(DEPS_DIR)/$(1)/ebin/$(1).app
+ $(call erlang,$(call dep_autopatch_rebar.erl,$1)); \
+ rm -f $(DEPS_DIR)/$1/ebin/$1.app
endef
define dep_autopatch_rebar.erl
@@ -700,7 +700,7 @@ define dep_autopatch_appsrc.erl
case filelib:is_regular(AppSrcIn) of
false -> ok;
true ->
- {ok, [{application, $(1), L0}]} = file:consult(AppSrcIn),
+ {ok, [{application, $1, L0}]} = file:consult(AppSrcIn),
L1 = lists:keystore(modules, 1, L0, {modules, []}),
L2 = case lists:keyfind(vsn, 1, L1) of
{_, git} -> lists:keyreplace(vsn, 1, L1, {vsn, lists:droplast(os:cmd("git -C $(DEPS_DIR)/$1 describe --dirty --tags --always"))});
@@ -708,7 +708,7 @@ define dep_autopatch_appsrc.erl
_ -> L1
end,
L3 = case lists:keyfind(registered, 1, L2) of false -> [{registered, []}|L2]; _ -> L2 end,
- ok = file:write_file(AppSrcOut, io_lib:format("~p.~n", [{application, $(1), L3}])),
+ ok = file:write_file(AppSrcOut, io_lib:format("~p.~n", [{application, $1, L3}])),
case AppSrcOut of AppSrcIn -> ok; _ -> ok = file:delete(AppSrcIn) end
end,
halt()
@@ -776,11 +776,11 @@ define dep_fetch_svn
endef
define dep_fetch_cp
- cp -R $(call query_repo_cp,$(1)) $(DEPS_DIR)/$(call query_name,$1);
+ cp -R $(call query_repo_cp,$1) $(DEPS_DIR)/$(call query_name,$1);
endef
define dep_fetch_ln
- ln -s $(call query_repo_ln,$(1)) $(DEPS_DIR)/$(call query_name,$1);
+ ln -s $(call query_repo_ln,$1) $(DEPS_DIR)/$(call query_name,$1);
endef
define hex_get_tarball.erl
@@ -821,7 +821,7 @@ endef
endif
define dep_fetch_fail
- echo "Error: Unknown or invalid dependency: $(1)." >&2; \
+ echo "Error: Unknown or invalid dependency: $1." >&2; \
exit 78;
endef
@@ -835,16 +835,16 @@ $(DEPS_DIR)/$(call query_name,$1): $(if $(filter hex,$(call query_fetch_method,$
fi
$(verbose) mkdir -p $(DEPS_DIR)
$(dep_verbose) $(call dep_fetch_$(strip $(call query_fetch_method,$1)),$1)
- $(verbose) if [ -f $(DEPS_DIR)/$(1)/configure.ac -o -f $(DEPS_DIR)/$(1)/configure.in ] \
- && [ ! -f $(DEPS_DIR)/$(1)/configure ]; then \
+ $(verbose) if [ -f $(DEPS_DIR)/$1/configure.ac -o -f $(DEPS_DIR)/$1/configure.in ] \
+ && [ ! -f $(DEPS_DIR)/$1/configure ]; then \
echo " AUTO " $(DEP_STR); \
- cd $(DEPS_DIR)/$(1) && autoreconf -Wall -vif -I m4; \
+ cd $(DEPS_DIR)/$1 && autoreconf -Wall -vif -I m4; \
fi
- $(verbose) if [ -f $(DEPS_DIR)/$(DEP_NAME)/configure ]; then \
echo " CONF " $(DEP_STR); \
cd $(DEPS_DIR)/$(DEP_NAME) && ./configure; \
fi
-ifeq ($(filter $(1),$(NO_AUTOPATCH)),)
+ifeq ($(filter $1,$(NO_AUTOPATCH)),)
$(verbose) $$(MAKE) --no-print-directory autopatch-$(DEP_NAME)
endif
diff --git a/core/erlc.mk b/core/erlc.mk
index f96fbe4..f3b499a 100644
--- a/core/erlc.mk
+++ b/core/erlc.mk
@@ -62,8 +62,8 @@ define app_file
{application, '$(PROJECT)', [
{description, "$(PROJECT_DESCRIPTION)"},
{vsn, "$(PROJECT_VERSION)"},$(if $(IS_DEP),
- {id$(comma)$(space)"$(1)"}$(comma))
- {modules, [$(call comma_list,$(2))]},
+ {id$(comma)$(space)"$1"}$(comma))
+ {modules, [$(call comma_list,$2)]},
{registered, []},
{applications, [$(call comma_list,kernel stdlib $(OTP_DEPS) $(LOCAL_DEPS) $(OPTIONAL_DEPS) $(foreach dep,$(DEPS),$(call query_name,$(dep))))]},
{optional_applications, [$(call comma_list,$(OPTIONAL_DEPS))]},
@@ -75,8 +75,8 @@ define app_file
{application, '$(PROJECT)', [
{description, "$(PROJECT_DESCRIPTION)"},
{vsn, "$(PROJECT_VERSION)"},$(if $(IS_DEP),
- {id$(comma)$(space)"$(1)"}$(comma))
- {modules, [$(call comma_list,$(2))]},
+ {id$(comma)$(space)"$1"}$(comma))
+ {modules, [$(call comma_list,$2)]},
{registered, [$(call comma_list,$(PROJECT)_sup $(PROJECT_REGISTERED))]},
{applications, [$(call comma_list,kernel stdlib $(OTP_DEPS) $(LOCAL_DEPS) $(OPTIONAL_DEPS) $(foreach dep,$(DEPS),$(call query_name,$(dep))))]},
{optional_applications, [$(call comma_list,$(OPTIONAL_DEPS))]},
@@ -104,7 +104,7 @@ ERL_FILES += $(addprefix src/,$(patsubst %.asn1,%.erl,$(notdir $(ASN1_FILES))))
define compile_asn1
$(verbose) mkdir -p include/
- $(asn1_verbose) erlc -v -I include/ -o asn1/ +noobj $(ERLC_ASN1_OPTS) $(1)
+ $(asn1_verbose) erlc -v -I include/ -o asn1/ +noobj $(ERLC_ASN1_OPTS) $1
$(verbose) mv asn1/*.erl src/
-$(verbose) mv asn1/*.hrl include/
$(verbose) mv asn1/*.asn1db include/
@@ -266,7 +266,7 @@ define makedep.erl
[233] -> unicode:characters_to_binary(Output0);
_ -> Output0
end,
- ok = file:write_file("$(1)", Output),
+ ok = file:write_file("$1", Output),
halt()
endef
@@ -302,7 +302,7 @@ ebin/:
define compile_erl
$(erlc_verbose) erlc -v $(if $(IS_DEP),$(filter-out -Werror,$(ERLC_OPTS)),$(ERLC_OPTS)) -o ebin/ \
- -pa ebin/ -I include/ $(filter-out $(ERLC_EXCLUDE_PATHS),$(COMPILE_FIRST_PATHS) $(1))
+ -pa ebin/ -I include/ $(filter-out $(ERLC_EXCLUDE_PATHS),$(COMPILE_FIRST_PATHS) $1)
endef
define validate_app_file
diff --git a/core/index.mk b/core/index.mk
index 0b75209..25c5e51 100644
--- a/core/index.mk
+++ b/core/index.mk
@@ -5,7 +5,7 @@
define pkg_print
$(verbose) printf "%s\n" \
- $(if $(call core_eq,$(1),$(pkg_$(1)_name)),,"Pkg name: $(1)") \
+ $(if $(call core_eq,$1,$(pkg_$(1)_name)),,"Pkg name: $1") \
"App name: $(pkg_$(1)_name)" \
"Description: $(pkg_$(1)_description)" \
"Home page: $(pkg_$(1)_homepage)" \
@@ -19,8 +19,8 @@ endef
search:
ifdef q
$(foreach p,$(PACKAGES), \
- $(if $(findstring $(call core_lc,$(q)),$(call core_lc,$(pkg_$(p)_name) $(pkg_$(p)_description))), \
- $(call pkg_print,$(p))))
+ $(if $(findstring $(call core_lc,$q),$(call core_lc,$(pkg_$(p)_name) $(pkg_$(p)_description))), \
+ $(call pkg_print,$p)))
else
- $(foreach p,$(PACKAGES),$(call pkg_print,$(p)))
+ $(foreach p,$(PACKAGES),$(call pkg_print,$p))
endif
diff --git a/core/kerl.mk b/core/kerl.mk
index f6995e9..35ce1f3 100644
--- a/core/kerl.mk
+++ b/core/kerl.mk
@@ -21,10 +21,10 @@ KERL_MAKEFLAGS ?=
OTP_GIT ?= https://github.com/erlang/otp
define kerl_otp_target
-$(KERL_INSTALL_DIR)/$(1): $(KERL)
+$(KERL_INSTALL_DIR)/$1: $(KERL)
$(verbose) if [ ! -d $$@ ]; then \
- MAKEFLAGS="$(KERL_MAKEFLAGS)" $(KERL) build git $(OTP_GIT) $(1) $(1); \
- $(KERL) install $(1) $(KERL_INSTALL_DIR)/$(1); \
+ MAKEFLAGS="$(KERL_MAKEFLAGS)" $(KERL) build git $(OTP_GIT) $1 $1; \
+ $(KERL) install $1 $(KERL_INSTALL_DIR)/$1; \
fi
endef
diff --git a/core/test.mk b/core/test.mk
index 8967fd1..d576619 100644
--- a/core/test.mk
+++ b/core/test.mk
@@ -41,7 +41,7 @@ test_erlc_verbose = $(test_erlc_verbose_$(V))
define compile_test_erl
$(test_erlc_verbose) erlc -v $(TEST_ERLC_OPTS) -o $(TEST_DIR) \
- -pa ebin/ -I include/ $(1)
+ -pa ebin/ -I include/ $1
endef
ERL_TEST_FILES = $(call core_find,$(TEST_DIR)/,*.erl)
diff --git a/plugins/ci.mk b/plugins/ci.mk
index b97c087..17110a5 100644
--- a/plugins/ci.mk
+++ b/plugins/ci.mk
@@ -19,7 +19,7 @@ ci-setup::
ci-extra::
$(verbose) :
-ci_verbose_0 = @echo " CI " $(1);
+ci_verbose_0 = @echo " CI " $1;
ci_verbose = $(ci_verbose_$(V))
define ci_target