lib/blocks/compile.rb in bake-toolkit-2.54.2 vs lib/blocks/compile.rb in bake-toolkit-2.54.3
- old
+ new
@@ -417,10 +417,13 @@
puts "Profiling #{Time.now - $timeStart}: prepareIncludes (#{@projectName+","+@config.name}) start..." if Bake.options.profiling
prepareIncludes
puts "Profiling #{Time.now - $timeStart}: prepareIncludes (#{@projectName+","+@config.name}) stop..." if Bake.options.profiling
end
+ odir = File.expand_path(@block.output_dir, @projectDir)
+ Utils.gitIgnore(odir) if !Bake.options.dry
+
fileListBlock = Set.new if Bake.options.filelist
compileJobs = Multithread::Jobs.new(@source_files) do |jobs|
while source = jobs.get_next_or_nil do
if (jobs.failed && Bake.options.stopOnFirstError) or Bake::IDEInterface.instance.get_abort
@@ -458,12 +461,10 @@
compileJobs.join
if Bake.options.filelist && !Bake.options.dry
Bake.options.filelist.merge(fileListBlock.merge(fileListBlock))
- odir = File.expand_path(@block.output_dir, @projectDir)
- FileUtils.mkdir_p(odir)
File.open(odir + "/" + "file-list.txt", 'wb') do |f|
fileListBlock.sort.each do |entry|
f.puts(entry)
end
end
@@ -674,11 +675,11 @@
if @include_merge[idir]
if (!inmerge)
mergeCounter += 1
mdir = File.expand_path(@block.output_dir+"/mergedIncludes#{mergeCounter}", @projectDir)
FileUtils.rm_rf(mdir)
- FileUtils.mkdir_p(mdir)
+ Utils.gitIgnore(mdir)
inmerge = true
end
if !merging
puts "Profiling #{Time.now - $timeStart}: glob..." if Bake.options.profiling
end
@@ -710,10 +711,10 @@
si = File.size(t)
puts "Size warning (>#{sizeWarning} byte): #{t} has #{si} byte" if si > sizeWarning and Bake.options.profiling
sum + si
end
puts "Profiling #{Time.now - $timeStart}: copy #{sum} byte in #{filesToCopy.length} files..." if Bake.options.profiling
- destDirs.each {|d| FileUtils.mkdir_p(d)}
+ destDirs.each {|d| Utils.gitIgnore(d) }
filesToCopy.each do |t, dest|
dest.each do |d|
FileUtils.cp_r(t, d, :preserve => true)
end
end
\ No newline at end of file