diff options
author | Thiago Macieira <thiago@macieira.org> | 2013-04-13 22:20:05 -0700 |
---|---|---|
committer | Thiago Macieira <thiago@macieira.org> | 2013-04-23 00:06:32 -0700 |
commit | f94b6bbefd1cef992fbc71808603612a6ee2f793 (patch) | |
tree | 36a7cdc68f0ee04980ffb6285fa6d0bf8a1e6831 /Rules.mk | |
parent | ce3f073d422d03d473ff18e6793a9228fb02fa12 (diff) | |
download | subsurface-f94b6bbefd1cef992fbc71808603612a6ee2f793.tar.gz |
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>
Diffstat (limited to 'Rules.mk')
-rw-r--r-- | Rules.mk | 32 |
1 files changed, 20 insertions, 12 deletions
@@ -19,6 +19,14 @@ PRODVERSION_STRING := $(shell $(GET_VERSION) win $(VERSION_STRING) || \ 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)) CXX_SOURCES = $(filter %.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)) %.o: %.c - @echo ' CC' $< + @$(PRETTYECHO) ' CC' $< @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 - @echo ' CXX' $< + @$(PRETTYECHO) ' CXX' $< @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 # files. %.moc.cpp: %.h - @echo ' MOC' $< - @$(MOC) $(MOCFLAGS) $< -o $@ + @$(PRETTYECHO) ' MOC' $< + $(COMPILE_PREFIX)$(MOC) $(MOCFLAGS) $< -o $@ # 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 # you'll get linker errors ("undefined vtable for...") %.moc: %.cpp - @echo ' MOC' $< - @$(MOC) -i $(MOCFLAGS) $< -o $@ + @$(PRETTYECHO) ' MOC' $< + $(COMPILE_PREFIX)$(MOC) -i $(MOCFLAGS) $< -o $@ # This creates the ui headers. ui_%.h: %.ui - @echo ' UIC' $< - @$(UIC) $< -o $@ + @$(PRETTYECHO) ' UIC' $< + $(COMPILE_PREFIX)$(UIC) $< -o $@ # This forces the creation of ui headers with the wrong path # This is required because the -MG option to the compiler outputs # unknown files with no path prefix ui_%.h: qt-ui/%.ui - @echo ' UIC' $< - @$(UIC) $< -o qt-ui/$@ + @$(PRETTYECHO) ' UIC' $< + $(COMPILE_PREFIX)$(UIC) $< -o qt-ui/$@ share/locale/%.UTF-8/LC_MESSAGES/subsurface.mo: po/%.po po/%.aliases mkdir -p $(dir $@) |