forked from alura-cursos/cursoopencobol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
executable file
·51 lines (43 loc) · 1.02 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#! rake -f
desc 'build'
task :build do |_task, args|
files = %w[
ambiente-pratica.cbl
aplicando-soma.cbl
comando-copy.cbl
comando-evaluate.cbl
comando-if.cbl
comparando-valores.cbl
criando-primeiro-programa.cbl
criando-variavel-indice.cbl
operadores-aritmeticos.cbl
operadores-relacionais.cbl
paragrafo-logica-estruturada.cbl
perform-times.cbl
perform-until.cbl
perform-varing.cbl
redefinindo-var-indice.cbl
valores-positivos-negativos.cbl
variavel-nivel-01.cbl
variavel-nivel-77.cbl
variavel-nivel-88.cbl
virgula-mascara.cbl
]
files.each do |filename|
cmd = "cobc -v -std=ibm-strict -Wall -Wcolumn-overflow -x #{filename}"
sh cmd
end
end
desc 'clean'
task :clean do
files = Dir['*']
executables = files.select do |f|
st = File.stat f
st.executable? && st.file? && File.exist?("#{f}.cbl")
end
puts "Estes arquivos serão apagados:", executables
executables.each do |f|
File.unlink(f)
end
end
task :default => [:build]