|
1 | 1 | jl:=julia
|
2 | 2 |
|
3 |
| -init: src/*jl |
4 |
| - $(jl) -e 'd=pwd(); @assert isdir(d);\ |
5 |
| - using Pkg: activate, instantiate, develop, precompile; \ |
6 |
| - activate(d); instantiate(); activate(joinpath(d, "examples")); \ |
7 |
| - develop(path=d); instantiate(); precompile();' |
8 |
| - @echo "Environment initialized at: $$PWD" |
| 3 | +init: src/* examples/* |
| 4 | + $(jl) --project=${PWD} -e 'using Pkg; Pkg.instantiate(); Pkg.precompile();' |
| 5 | + $(jl) --project=${PWD}/examples -e 'using Pkg; Pkg.develop(path="${PWD}"); Pkg.instantiate(); Pkg.precompile();' |
| 6 | + echo "Environment initialized at: ${PWD}" |
9 | 7 |
|
10 |
| -update: src/*jl |
11 |
| - $(jl) -e 'd=pwd(); @assert isdir(d);\ |
12 |
| - using Pkg: activate, update, develop, precompile; \ |
13 |
| - activate(d); update(); activate(joinpath(d, "examples")); \ |
14 |
| - update(); precompile();' |
15 |
| - @echo "Environment updated at: $$PWD" |
| 8 | +update: src/* examples/* |
| 9 | + $(jl) --project=${PWD} -e 'using Pkg; Pkg.update()' |
| 10 | + $(jl) --project=${PWD}/examples -e 'using Pkg; Pkg.update(); Pkg.precompile()' |
| 11 | + echo "Environment updated at: ${PWD}" |
16 | 12 |
|
17 |
| -test: test/*jl |
18 |
| - @echo "Running tests at: $$PWD" |
19 |
| - $(jl) -e 'd=pwd(); @assert isdir(d);\ |
20 |
| - using Pkg: activate, test; \ |
21 |
| - activate(d); test();' |
| 13 | +test: src/* test/* |
| 14 | + echo "Running tests at: ${PWD}" |
| 15 | + $(jl) --project=${PWD} -e 'using Pkg; Pkg.test();' |
| 16 | + |
| 17 | +# examples: src/* examples/* |
| 18 | +# echo "Running examples at: ${PWD}" |
| 19 | +# $(jl) --project=${PWD}/examples -e 'using Pkg; include(joinpath(pwd(), "examples", "main.jl"));' |
0 commit comments