News for hackers. Stuff that matters.
Re:Ask HN: In what creative ways are you using Makefiles? by steinuil on Monday July 24, 2017 @04:58AM (#14836870)
Actually, Rake has both. You can define file targets using "file", but I found that for smaller projects it just becomes a more verbose make.
Re:Ask HN: In what creative ways are you using Makefiles? by bjpbakker on Monday July 24, 2017 @05:19AM (#14836965)
True, Rake also has file tasks. There still are tasks and not much like file targets in Make.
Re:Ask HN: In what creative ways are you using Makefiles? by shoo on Monday July 24, 2017 @07:03AM (#14837399)
i think Rake is one of the various newer re-implementations of make that more or less miss the point of what is good about make.

make is pretty neat if you think about it as a framework to help you compute/derive values from other values. each value happens to be stored in the filesystem as a file.

in contrast, many of the newer build-tool make replacements seem to miss the whole value of values and either push or force you in a direction of doing actions with side effects.

Re:Ask HN: In what creative ways are you using Makefiles? by matt4077 on Monday July 24, 2017 @11:33AM (#14839296)
They are pretty much the same:

   file 'blogpost.html' # we want to produce blogpost.html

   # this rule specifies how to build 
   # any .html from the source
   rule ".html" => ".md" do |t| 
      sh "pandoc -o #{t.name} #{t.source}"
   end