Skip to content

Commit d079c2f

Browse files
authored
Move cleanup logic into Makefile (#309)
PR #308 brought up the issue that the `clean` command of rebar3 had a Unix-based script as a `post_hook` that could not be run on Windows. Rather that adopting #308 and run the risk of leaving out some OSes, move all cleanup logic, including calling cleanup scripts, to the Makefile instead. This should avoid `rebar3 clean` crashing on Windows. While at it, move the `rebar3 clean` call from the `distclean` to the `clean` target of Makefile, which seems more standard (and kosher). Closes #308
1 parent 3de5f72 commit d079c2f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2010-2022 Manolis Papadakis <manopapad@gmail.com>,
1+
# Copyright 2010-2023 Manolis Papadakis <manopapad@gmail.com>,
22
# Eirini Arvaniti <eirinibob@gmail.com>,
33
# and Kostis Sagonas <kostis@cs.ntua.gr>
44
#
@@ -72,11 +72,13 @@ doc: compile
7272

7373
clean:
7474
./scripts/clean_temp.sh
75+
./scripts/clean_doc.sh
76+
$(REBAR3) clean
7577

7678
distclean: clean
77-
$(REBAR3) clean
78-
$(RM) .plt/proper_plt
79-
$(RM) -r _build ebin rebar3 rebar.lock
79+
$(RM) ebin .plt/proper_plt
80+
$(RM) rebar3 rebar.lock
81+
$(RM) -r _build
8082

8183
rebuild: distclean compile
8284

rebar.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%%% -*- coding: utf-8; erlang-indent-level: 2 -*-
22
%%% -------------------------------------------------------------------
3-
%%% Copyright 2010-2022 Manolis Papadakis <manopapad@gmail.com>,
3+
%%% Copyright 2010-2023 Manolis Papadakis <manopapad@gmail.com>,
44
%%% Eirini Arvaniti <eirinibob@gmail.com>,
55
%%% and Kostis Sagonas <kostis@cs.ntua.gr>
66
%%%
@@ -55,7 +55,7 @@
5555
proper_unused_imports_remover,
5656
vararg]}]}]}.
5757

58-
{post_hooks, [{clean, "./scripts/clean_doc.sh"}]}.
58+
{post_hooks, []}.
5959

6060
{dialyzer, [{warnings, [unmatched_returns, unknown]},
6161
{plt_extra_apps, [erts, kernel, stdlib, compiler, crypto, syntax_tools]}]}.

0 commit comments

Comments
 (0)