swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 5192aff3bcd6494b3ee785219e2dff480193d327
parent 1c5c4fe3815d97f094ef4af8e757ac92b21aca63
Author: Michael Forney <mforney@mforney.org>
Date:   Sat,  1 Nov 2014 07:06:12 +0000

Simplify silent rules

Diffstat:
MMakefile | 27++++++++++++++-------------
Mcursor/local.mk | 2+-
Mlibswc/local.mk | 6+++---
Mprotocol/local.mk | 4++--
4 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/Makefile b/Makefile @@ -67,15 +67,6 @@ endef $(foreach pkg,$(PACKAGES),$(eval $(call check,$(pkg)))) -ifeq ($(if $(V),$(V),0), 0) - define quiet - @echo " $1 $@" - @$(if $2,$2,$($1)) - endef -else - quiet = $(if $2,$2,$($1)) -endif - FINAL_CFLAGS = $(CFLAGS) -fvisibility=hidden -std=gnu99 FINAL_CPPFLAGS = $(CPPFLAGS) -D_GNU_SOURCE # Required for mkostemp @@ -89,9 +80,19 @@ ifeq ($(ENABLE_DEBUG),1) FINAL_CFLAGS += -g endif -compile = $(call quiet,CC) $(FINAL_CPPFLAGS) $(FINAL_CFLAGS) -I . -c -o $@ $< \ - -MMD -MP -MF .deps/$(basename $<).d -MT $(basename $@).o -MT $(basename $@).lo -link = $(call quiet,CCLD,$(CC)) $(LDFLAGS) -o $@ $^ +ifeq ($(if $(V),$(V),0),0) + quiet = @echo ' $1 $@'; +endif + +Q_AR = $(call quiet,AR ) +Q_CC = $(call quiet,CC ) +Q_CCLD = $(call quiet,CCLD ) +Q_GEN = $(call quiet,GEN ) +Q_SYM = $(call quiet,SYM ) + +compile = $(Q_CC)$(CC) $(FINAL_CPPFLAGS) $(FINAL_CFLAGS) -I . -c -o $@ $< \ + -MMD -MP -MF .deps/$(basename $<).d -MT $(basename $@).o -MT $(basename $@).lo +link = $(Q_CCLD)$(CC) $(LDFLAGS) -o $@ $^ include $(SUBDIRS:%=%/local.mk) @@ -102,7 +103,7 @@ $(foreach dir,BIN LIB INCLUDE PKGCONFIG,$(DESTDIR)$($(dir)DIR)) $(DESTDIR)$(DATA build: $(SUBDIRS:%=build-%) $(TARGETS) swc.pc: swc.pc.in - $(call quiet,GEN,sed) \ + $(Q_GEN)sed \ -e "s:@VERSION@:$(VERSION):" \ -e "s:@PREFIX@:$(PREFIX):" \ -e "s:@LIBDIR@:$(LIBDIR):" \ diff --git a/cursor/local.mk b/cursor/local.mk @@ -8,7 +8,7 @@ $(dir)/convert_font: $(dir)/convert_font.o $(link) $(dir)/cursor_data.h: $(dir)/cursor.pcf $(dir)/convert_font - $(call quiet,GEN,cursor/convert_font) $< $@ 2> /dev/null + $(Q_GEN)cursor/convert_font $< $@ 2>/dev/null CLEAN_FILES += $(dir)/convert_font.o diff --git a/libswc/local.mk b/libswc/local.mk @@ -84,16 +84,16 @@ $(call objects,xdg_shell xdg_surface xdg_popup): protocol/xdg-shell-server-proto $(call objects,pointer): cursor/cursor_data.h $(dir)/libswc.a: $(SWC_STATIC_OBJECTS) - $(call quiet,AR) cru $@ $^ + $(Q_AR)$(AR) cru $@ $^ $(dir)/$(LIBSWC_LIB): $(SWC_SHARED_OBJECTS) $(link) -shared -Wl,-soname,$(LIBSWC_SO) -Wl,-no-undefined $(libswc_PACKAGE_LIBS) $(dir)/$(LIBSWC_SO): $(dir)/$(LIBSWC_LIB) - $(call quiet,SYM,ln -sf) $(notdir $<) $@ + $(Q_SYM)ln -sf $(notdir $<) $@ $(dir)/$(LIBSWC_LINK): $(dir)/$(LIBSWC_SO) - $(call quiet,SYM,ln -sf) $(notdir $<) $@ + $(Q_SYM)ln -sf $(notdir $<) $@ .PHONY: install-libswc.a install-libswc.a: $(dir)/libswc.a | $(DESTDIR)$(LIBDIR) diff --git a/protocol/local.mk b/protocol/local.mk @@ -12,10 +12,10 @@ $(dir)_TARGETS := $(PROTOCOL_EXTENSIONS:%.xml=%-protocol.c) \ $(dir)_PACKAGES := wayland-server $(dir)/%-protocol.c: $(dir)/%.xml - $(call quiet,GEN,$(WAYLAND_SCANNER)) code < $< > $@ + $(Q_GEN)$(WAYLAND_SCANNER) code <$< >$@ $(dir)/%-server-protocol.h: $(dir)/%.xml - $(call quiet,GEN,$(WAYLAND_SCANNER)) server-header < $< > $@ + $(Q_GEN)$(WAYLAND_SCANNER) server-header <$< >$@ install-protocol: | $(DESTDIR)$(DATADIR)/swc install -m0644 protocol/swc.xml "$(DESTDIR)$(DATADIR)/swc"