mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 07:23:23 +00:00
Make the "silent mode" compilation be optional only.
If you run make V=1 Then we'll output the full command-line. It's useful for debugging problems with the build. Signed-off-by: Thiago Macieira <thiago@macieira.org>
This commit is contained in:
parent
ce3f073d42
commit
f94b6bbefd
1 changed files with 20 additions and 12 deletions
32
Rules.mk
32
Rules.mk
|
@ -19,6 +19,14 @@ PRODVERSION_STRING := $(shell $(GET_VERSION) win $(VERSION_STRING) || \
|
||||||
|
|
||||||
MSGOBJS=$(addprefix share/locale/,$(MSGLANGS:.po=.UTF-8/LC_MESSAGES/subsurface.mo))
|
MSGOBJS=$(addprefix share/locale/,$(MSGLANGS:.po=.UTF-8/LC_MESSAGES/subsurface.mo))
|
||||||
|
|
||||||
|
ifeq ($(V),1)
|
||||||
|
PRETTYECHO=true
|
||||||
|
COMPILE_PREFIX=
|
||||||
|
else
|
||||||
|
PRETTYECHO=echo
|
||||||
|
COMPILE_PREFIX=@
|
||||||
|
endif
|
||||||
|
|
||||||
C_SOURCES = $(filter %.c, $(SOURCES))
|
C_SOURCES = $(filter %.c, $(SOURCES))
|
||||||
CXX_SOURCES = $(filter %.cpp, $(SOURCES))
|
CXX_SOURCES = $(filter %.cpp, $(SOURCES))
|
||||||
OTHER_SOURCES = $(filter-out %.c %.cpp, $(SOURCES))
|
OTHER_SOURCES = $(filter-out %.c %.cpp, $(SOURCES))
|
||||||
|
@ -133,39 +141,39 @@ update-po-files:
|
||||||
MOCFLAGS = $(filter -I%, $(CXXFLAGS) $(EXTRA_FLAGS)) $(filter -D%, $(CXXFLAGS) $(EXTRA_FLAGS))
|
MOCFLAGS = $(filter -I%, $(CXXFLAGS) $(EXTRA_FLAGS)) $(filter -D%, $(CXXFLAGS) $(EXTRA_FLAGS))
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
@echo ' CC' $<
|
@$(PRETTYECHO) ' CC' $<
|
||||||
@mkdir -p .dep .dep/qt-ui
|
@mkdir -p .dep .dep/qt-ui
|
||||||
@$(CC) $(CFLAGS) $(EXTRA_FLAGS) -MD -MF .dep/$@.dep -c -o $@ $<
|
$(COMPILE_PREFIX)$(CC) $(CFLAGS) $(EXTRA_FLAGS) -MD -MF .dep/$@.dep -c -o $@ $<
|
||||||
|
|
||||||
%.o: %.cpp
|
%.o: %.cpp
|
||||||
@echo ' CXX' $<
|
@$(PRETTYECHO) ' CXX' $<
|
||||||
@mkdir -p .dep .dep/qt-ui
|
@mkdir -p .dep .dep/qt-ui
|
||||||
@$(CXX) $(CXXFLAGS) $(EXTRA_FLAGS) -MD -MF .dep/$@.dep -c -o $@ $<
|
$(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
|
# This rule is for running the moc on QObject subclasses defined in the .h
|
||||||
# files.
|
# files.
|
||||||
%.moc.cpp: %.h
|
%.moc.cpp: %.h
|
||||||
@echo ' MOC' $<
|
@$(PRETTYECHO) ' MOC' $<
|
||||||
@$(MOC) $(MOCFLAGS) $< -o $@
|
$(COMPILE_PREFIX)$(MOC) $(MOCFLAGS) $< -o $@
|
||||||
|
|
||||||
# This rule is for running the moc on QObject subclasses defined in the .cpp
|
# This rule is for running the moc on QObject subclasses defined in the .cpp
|
||||||
# files; remember to #include "<file>.moc" at the end of the .cpp file, or
|
# files; remember to #include "<file>.moc" at the end of the .cpp file, or
|
||||||
# you'll get linker errors ("undefined vtable for...")
|
# you'll get linker errors ("undefined vtable for...")
|
||||||
%.moc: %.cpp
|
%.moc: %.cpp
|
||||||
@echo ' MOC' $<
|
@$(PRETTYECHO) ' MOC' $<
|
||||||
@$(MOC) -i $(MOCFLAGS) $< -o $@
|
$(COMPILE_PREFIX)$(MOC) -i $(MOCFLAGS) $< -o $@
|
||||||
|
|
||||||
# This creates the ui headers.
|
# This creates the ui headers.
|
||||||
ui_%.h: %.ui
|
ui_%.h: %.ui
|
||||||
@echo ' UIC' $<
|
@$(PRETTYECHO) ' UIC' $<
|
||||||
@$(UIC) $< -o $@
|
$(COMPILE_PREFIX)$(UIC) $< -o $@
|
||||||
|
|
||||||
# This forces the creation of ui headers with the wrong path
|
# This forces the creation of ui headers with the wrong path
|
||||||
# This is required because the -MG option to the compiler outputs
|
# This is required because the -MG option to the compiler outputs
|
||||||
# unknown files with no path prefix
|
# unknown files with no path prefix
|
||||||
ui_%.h: qt-ui/%.ui
|
ui_%.h: qt-ui/%.ui
|
||||||
@echo ' UIC' $<
|
@$(PRETTYECHO) ' UIC' $<
|
||||||
@$(UIC) $< -o qt-ui/$@
|
$(COMPILE_PREFIX)$(UIC) $< -o qt-ui/$@
|
||||||
|
|
||||||
share/locale/%.UTF-8/LC_MESSAGES/subsurface.mo: po/%.po po/%.aliases
|
share/locale/%.UTF-8/LC_MESSAGES/subsurface.mo: po/%.po po/%.aliases
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
|
|
Loading…
Add table
Reference in a new issue