mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Don't hardcode the paths for mkdir: just get them from the target
The $(@D) (equivalent to $(dir $@)) tells us what the directory the target is in. We could also have used the one for the source. They're equivalent there. Signed-off-by: Thiago Macieira <thiago@macieira.org>
This commit is contained in:
parent
c5d244eeea
commit
d312b7d6fd
1 changed files with 3 additions and 3 deletions
6
Rules.mk
6
Rules.mk
|
@ -143,12 +143,12 @@ MOCFLAGS = $(filter -I%, $(CXXFLAGS) $(EXTRA_FLAGS)) $(filter -D%, $(CXXFLAGS) $
|
|||
|
||||
%.o: %.c
|
||||
@$(PRETTYECHO) ' CC' $<
|
||||
@mkdir -p .dep .dep/qt-ui
|
||||
@mkdir -p .dep/$(@D)
|
||||
$(COMPILE_PREFIX)$(CC) $(CFLAGS) $(EXTRA_FLAGS) -MD -MF .dep/$@.dep -c -o $@ $<
|
||||
|
||||
%.o: %.cpp
|
||||
@$(PRETTYECHO) ' CXX' $<
|
||||
@mkdir -p .dep .dep/qt-ui
|
||||
@mkdir -p .dep/$(@D)
|
||||
$(COMPILE_PREFIX)$(CXX) $(CXXFLAGS) $(EXTRA_FLAGS) -MD -MF .dep/$@.dep -c -o $@ $<
|
||||
|
||||
# This rule is for running the moc on QObject subclasses defined in the .h
|
||||
|
@ -220,7 +220,7 @@ confclean: clean
|
|||
|
||||
ifneq ($(CONFIGURED)$(CONFIGURING),)
|
||||
.dep/%.o.dep: %.cpp
|
||||
@mkdir -p .dep .dep/qt-ui
|
||||
@mkdir -p $(@D)
|
||||
@$(CXX) $(CXXFLAGS) $(EXTRA_FLAGS) -MM -MG -MF $@ -MT $(<:.cpp=.o) -c $<
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue