[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automatic dependencies and clean rule
From: |
Nick Andrik |
Subject: |
Re: Automatic dependencies and clean rule |
Date: |
Thu, 28 Mar 2013 05:20:27 +0100 |
>> Hmm, that's an interesting approach, but I still need to use the
>> -include directive, no?
>
> Yes, you still need the -include...
>
>> If I do, then my problem persists: .d files are created for each make
>> clean invocation
>
> ...but this won't happen if the .d files are not targets.
Yes, this seems to have resolved the problem.
My Makefile now looks like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$(OBJDIR)%.o: %.cpp | $(OBJDIR) $(BISON_HDRS)
$(CXX) $(CXXFLAGS) -c $< -o $@ -MMD -MP -MT '$(OBJDIR)$*.o'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks a lot,
Nick
--
=Do-
N.AND