|
|
|
|
|
by Too
3228 days ago
|
|
Sorry but that makefile is repeating the absolutely most common mistake in make. If you use @import in your scss file the css will not be rebuilt if only the imported file is modified. So no. It does not take 5 lines to teach make how to build Sass. To solve this you either need to teach make about sass @import, or teach sass about make and let it generate makefiles (like gcc -MMd). Or simply just use sass --watch for incremental builds and take the recompile hit if you need to restart it for whatever reason. (While I'm at it...Another thing missing from that makefile is source maps (.css.map) generated by the sass compiler. It's not only one css file being generated from each sass file. That will complicate the rules even further) |
|
To fix the `.css.map` issue is simple. You can't use the pattern you've seen for yacc/bison, though. The `$@` var would have both files in it.
Instead, simply adjust the pattern to rule to be the functional equivalent: