[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to debug my Makefile
From: |
Stefan Monnier |
Subject: |
Re: How to debug my Makefile |
Date: |
Fri, 20 Jul 2018 13:27:46 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> > Looking at the make file I see one $(shell ..) invocation which is the
> > most likely culprit:
> >
> > define SET-diff
> > $(shell echo "$(1)" "$(2)" "$(2)" | tr ' ' '\n' | sort | uniq -u)
> > endef
>
> Could you use a standard Make rule to generate an output file,
How could I generate an output file via a Make rule when the desired
content of the file is in a Make variable that's too big for the
command line?
> and then use redirection to provide the output file to any programs.
SET-diff is used to build Make variables which are then used as "lists
of targets", so I'd have to use a nested Make invocation :-(
> Within Gnu Make, it's pretty easy to $(sort) sort a list, but
> de-duplicating it is a bit tougher.
I need a set-difference, not a deduplication.
> It could be done fairly easily
> with the associative arrays or sets in the Gnu Make Standard Library:
> https://gmsl.sourceforge.io/
Wow, heroic!
I'll see how/if I can make use of it, thanks,
Stefan