░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/var/www/canvas/vendor/bundle/ruby/3.1.0/gems/rake-13.0.6/doc/example
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: Rakefile2
# Example Rakefile -*- ruby -*- # Using the power of Ruby task :default => [:main] def ext(fn, newext) fn.sub(/\.[^.]+$/, newext) end SRCFILES = Dir['*.c'] OBJFILES = SRCFILES.collect { |fn| ext(fn,".o") } OBJFILES.each do |objfile| srcfile = ext(objfile, ".c") file objfile => [srcfile] do |t| sh "gcc #{srcfile} -c -o #{t.name}" end end file "main" => OBJFILES do |t| sh "gcc -o #{t.name} main.o a.o b.o" end task :clean do rm_f FileList['*.o'] Dir['*~'].each { |fn| rm_f fn } end task :clobber => [:clean] do rm_f "main" end task :run => ["main"] do sh "./main" end
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 a.c
C
65 B
2023-09-24 03:46
EDIT
📄 b.c
C
65 B
2023-09-24 03:46
EDIT
📄 main.c
C
103 B
2023-09-24 03:46
EDIT
📄 Rakefile1
?
670 B
2023-09-24 03:46
EDIT
📄 Rakefile2
?
599 B
2023-09-24 03:46
EDIT