4 ms·
You don't need to (specifically) teach make about `@import`. It's another scss file and it (hopefully) should be a part of your SRC list. Yes, having somethin
by oso2k 9y ago
You don't need to (specifically) teach make about `@import`. It's another scss file and it (hopefully) should be a part of your SRC list. Yes, having something like `gcc -MMd` would be better but that's sass for you.
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.
%.tab.c %.tab.h: %.y
bison -d $<
Instead, simply adjust the pattern to rule to be the functional equivalent:
css/%.css : scss/%.scss
sass $<:$@
css/%.css.map : scss/%.scss
@touch $@
- Too 9y agoEven if the imported file is part of SRC list, any files importing it will not be rebuilt if only that file is modified.
- oso2k 9y agoAhh. Got you. And easy fix again. Add `$(SRC)` to the pattern rule. css/%.css : $(SRC) scss/%.scss sass $<:$@ css/%.css.map : $(SRC) scss/%.scss @touch $@
- Too 9y agoNow you will get correct results. But now if you change just one file, you will always rebuild everything, even files that don't import the changed file. Maybe not a big deal for SASS as you usually don't have mega LOCs of SASS and compiling is fairly quick. Just want to highlight that make isn't always as simple as it looks at second glance.