From 65c4ec5ce17e6e24fa625f5c63ec6259ca0a0b3d Mon Sep 17 00:00:00 2001 From: Jon Carstens Date: Sun, 17 Dec 2023 17:55:54 -0700 Subject: [PATCH] Reduce Makefile prints to clean build output Makefile and CC prints can be useful, but most of the time they are overwhelming especially for non-C programmers. This simplifies the prints. To re-enable, set `V=1` like is common with many Makefile/C projects. For example `V=1 make`, `V=1 mix compile`, etc. --- Makefile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 7e9a9f53..d0ebed04 100644 --- a/Makefile +++ b/Makefile @@ -53,16 +53,12 @@ docs_report: MIX_ENV=docs mix inch.report $(BUILD)/%.o: c_src/%.c + @echo " CC $(notdir $@)" $(CC) -c $(ERL_CFLAGS) $(CFLAGS) -o $@ $< -$(PREFIX)/line.so: $(BUILD)/line.o - $(CC) $^ $(ERL_LDFLAGS) $(LDFLAGS) -o $@ - -$(PREFIX)/matrix.so: $(BUILD)/matrix.o - $(CC) $^ $(ERL_LDFLAGS) $(LDFLAGS) -o $@ - -$(PREFIX)/bitmap.so: $(BUILD)/bitmap.o - $(CC) $^ $(ERL_LDFLAGS) $(LDFLAGS) -o $@ +$(PREFIX)/%.so: $(BUILD)/%.o + @echo " LD $(notdir $@)" + $(CC) $< $(ERL_LDFLAGS) $(LDFLAGS) -o $@ $(PREFIX) $(BUILD): mkdir -p $@ @@ -70,3 +66,5 @@ $(PREFIX) $(BUILD): clean: $(RM) $(NIF) c_src/*.o +# Don't echo commands unless the caller exports "V=1" +${V}.SILENT: