From d171e0633704ecdea122741cc03774233fe0d365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Thu, 19 Oct 2017 17:36:38 +0200 Subject: [PATCH] Rakefile: make header dependency optional --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index d14ef90..cad0c21 100644 --- a/Rakefile +++ b/Rakefile @@ -143,7 +143,7 @@ task :doc => ["Doxyfile", "README.md"] do |t| end desc "compile source into object" -rule '.o' => ['.c', '.h', "#{LIBOPENCM3_LIB}/lib#{STM32F1_LIB}.a"] do |t| +rule '.o' => ['.c', proc{|f| File.file?(f.ext("h")) ? f.ext("h") : []}, "#{LIBOPENCM3_LIB}/lib#{STM32F1_LIB}.a"] do |t| sh "#{CC} #{cflags} #{archflags} -o #{t.name} -c #{t.prerequisites[0]}" end