support for outputting dependency lines, suitable for use in a Makefile. #304

wants to merge 1 commit into


None yet

3 participants


this adds the -depends switch, which outputs a dependency line instead of producing CSS output.

this is common behavior in compilers, for example "gcc -M", and can be used to write makefiles that understand when to rebuild if an imported file has changed.


This is an awesome change. I was looking through different weird ways of doing this, This should definitley be merged into master.

However, you should just add this
case 'M':
between line 44 and 45 in bin/lessc to keep consistent with other compilers generating dependency lines.


Doesn't seem like it recurses. F.x. You have filez X, Y and Z.
X imports Y
Y imports Z

Z is not a outputted as a dependency for X. This could need fixing.


I've added my contribution into #545, didn't know how to contribute to this pull request.


closing in favour of #545

@lukeapage lukeapage closed this Aug 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment