Skip to content

Commit

Permalink
build: for make V=1, drop silencing @ from recipes in top level Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
lge committed Mar 24, 2024
1 parent ce77191 commit ca25a85
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions drbd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
# note: if you get strange make errors when ARCH=um, you
# probably need to "make mrproper" in the KDIR first...

Q := $(if $(V),,@)

ifeq ($(BUILD_OFED),1)
OFED_KERNEL_DIR ?= $(firstword $(wildcard /usr/src/ofa_kernel/$(arch)/$(kernelver) /usr/src/ofa_kernel/default))
ifdef OFED_KERNEL_DIR
Expand Down Expand Up @@ -193,17 +195,17 @@ else
export KDIR O V

greeting:
@echo "" ;\
$(Q)echo "" ;\
echo " Calling toplevel makefile of kernel source tree, which I believe is in" ;\
echo " KDIR=$(KDIR)" ; \
echo "";
@if ! test -e $(KDIR)/Makefile ; then \
$(Q)if ! test -e $(KDIR)/Makefile ; then \
echo -e " SORRY, kernel makefile not found. You need to tell me a correct KDIR!\n" ;\
false;\
fi

unpatch:
@if test -e .compat_patches_applied; then \
$(Q)if test -e .compat_patches_applied; then \
echo "Removing compat patches"; \
patch -R -p0 --batch --reject-file=- < .compat_patches_applied && \
rm -f .compat_patches_applied; \
Expand All @@ -223,17 +225,17 @@ else
# module with two object files, but ask to generate only one part now.
.PHONY: compat.h
compat.h:
@> dummy-for-compat-h.c
$(Q)> dummy-for-compat-h.c
$(MAKE) -C $(KDIR) $(if $(O),O=$(O),) M=$(DRBDSRC) $(ARCH_UM) "PRE_CFLAGS=$(PRE_CFLAGS)" \
obj-m=dummy-for-compat.o dummy-for-compat-h.o

kbuild: fix-tar-timestamps
@rm -f .drbd_kernelrelease*
$(Q)rm -f .drbd_kernelrelease*
cat /dev/null $(KBUILD_EXTRA_SYMBOLS) $(OFED_MODULE_SYMVERS) > Module.symvers
$(MAKE) -C $(KDIR) $(if $(O),O=$(O),) M=$(DRBDSRC) $(ARCH_UM) modules "PRE_CFLAGS=$(PRE_CFLAGS)"
-mv .drbd_kernelrelease.new .drbd_kernelrelease
@echo -n "Memorizing module configuration ... "
@config=$$( (for x in $(KDIR)/.config $(O)/.config ; do \
$(Q)echo -n "Memorizing module configuration ... "
$(Q)config=$$( (for x in $(KDIR)/.config $(O)/.config ; do \
if test -e $$x ; then echo $$x ; exit 0; fi ; \
done; echo $(KDIR)/.config) | sed -e 's,//,/,g') ; \
{ echo -e "#\n# drbd.o was compiled with" ; \
Expand All @@ -246,7 +248,7 @@ else
echo "# $$(readlink $${config%/.config})/.config" || echo "" ; \
echo -e "# follows\n#\n" ; \
cat $$config ; } | gzip > .kernel.config.gz
@echo "done."
$(Q)echo "done."

clean: unpatch
rm -rf .tmp_versions Module.markers Module.symvers modules.order
Expand Down Expand Up @@ -275,13 +277,13 @@ else
include Makefile.cocci-sources

$(compat_patches): $(sources)
@. ./drbd-kernel-compat/gen_compat_patch.sh $@ $^
$(Q). ./drbd-kernel-compat/gen_compat_patch.sh $@ $^

compat: $(compat_patches)

.PHONY: fix-tar-timestamps
fix-tar-timestamps:
@-test -e ../.git || test -e .timestamps_fixed || \
$(Q)-test -e ../.git || test -e .timestamps_fixed || \
touch drbd-kernel-compat/cocci_cache/*/compat.patch .timestamps_fixed

uninstall:
Expand Down

0 comments on commit ca25a85

Please sign in to comment.