[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU make troubleshooting
From: |
Torbjorn SVENSSON |
Subject: |
Re: GNU make troubleshooting |
Date: |
Sun, 16 Jul 2023 21:24:44 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 |
On 2023-07-16 15:58, Alejandro Colomar wrote:
Wow! That's a great help for debugging the Linux man-pages's makefiles,
which don't need to be remade. It was very painful to me to ignore so
much make -d output. I applied the following patch, and it works like
a charm.
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?id=c98d237c22e9e898ae7d05e2222e7eac47791bd3>
Why are you wasting time doing grep when you can have find return just
those files that ends with .mk? Also, why need to sort the list when
it's only for make to define a rule?
I would have done something along these lines if I were in your shoes:
MK := $(srcdir)/Makefile
MK += $(shell $(FIND) $(MAKEFILEDIR) -type f -name '*.mk')
Or, a more cleaner solution would have been to define the MK-array in
the $(srcdir)/Makefile as you have it hard coded for the include
statements now.
MK := \
$(MAKEFILEDIR)/check/_.mk \
$(MAKEFILEDIR)/check/catman.mk \
$(MAKEFILEDIR)/build/_.mk \
$(MAKEFILEDIR)/build/catman.mk \
$(MAKEFILEDIR)/build/html.mk \
$(MAKEFILEDIR)/build/pdf.mk \
$(MAKEFILEDIR)/build/pre.mk \
$(MAKEFILEDIR)/build/ps.mk \
$(MAKEFILEDIR)/build/src.mk \
$(MAKEFILEDIR)/dist.mk \
$(MAKEFILEDIR)/install/_.mk \
$(MAKEFILEDIR)/install/html.mk \
$(MAKEFILEDIR)/install/man.mk \
$(MAKEFILEDIR)/lint/_.mk \
$(MAKEFILEDIR)/lint/c.mk \
$(MAKEFILEDIR)/lint/man/_.mk \
$(MAKEFILEDIR)/lint/man/man.mk \
$(MAKEFILEDIR)/lint/man/mdoc.mk \
$(MAKEFILEDIR)/make.mk \
$(MAKEFILEDIR)/verbose.mk
include $(MK)
$(srcdir)/Makefile $(MK):: ;
Kind regards,
Torbjörn
- Re: GNU make troubleshooting, (continued)
- Re: GNU make troubleshooting, Alejandro Colomar, 2023/07/16
- Re: GNU make troubleshooting, Dmitry Goncharov, 2023/07/16
- wildcard and globstar (was: GNU make troubleshooting), Alejandro Colomar, 2023/07/16
- Re: wildcard and globstar (was: GNU make troubleshooting), Dmitry Goncharov, 2023/07/16
- Re: wildcard and globstar (was: GNU make troubleshooting), Alejandro Colomar, 2023/07/16
- Re: wildcard and globstar, Andreas Schwab, 2023/07/17
- Re: wildcard and globstar, David Boyce, 2023/07/17
- Re: wildcard and globstar, Paul Smith, 2023/07/17
- Re: wildcard and globstar, Alejandro Colomar, 2023/07/17
- Re: wildcard and globstar (was: GNU make troubleshooting), Dmitry Goncharov, 2023/07/18
- Re: GNU make troubleshooting,
Torbjorn SVENSSON <=
- Re: GNU make troubleshooting, Philip Guenther, 2023/07/16
- Re: GNU make troubleshooting, Alejandro Colomar, 2023/07/16
Re: GNU make troubleshooting, Paul Smith, 2023/07/17