Adjust sed regex that processes dependency file from compiler

so that resulting file is correct also on windows systems (ie.
with file names containing drive letter).
This commit is contained in:
Ari Suutari 2015-05-05 21:39:28 +03:00 committed by Paul Sokolovsky
parent c98c128fe8
commit c097ea5dd2

View File

@ -36,7 +36,7 @@ $(Q)$(CC) $(CFLAGS) -c -MD -o $@ $<
@# The following fixes the dependency file.
@# See http://make.paulandlesley.org/autodep.html for details.
@$(CP) $(@:.o=.d) $(@:.o=.P); \
$(SED) -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
$(SED) -e 's/#.*//' -e 's/^.*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $(@:.o=.d) >> $(@:.o=.P); \
$(RM) -f $(@:.o=.d)
endef