Chain of pattern rule and non-terminal match-anything rule

2019-01-10 Thread Renaud Pacalet
r -p $@ then I get: $ make aa/bb.dat mkdir -p aa touch aa/bb.dat rm aamake: unlink: aa: Is a directory which I perfectly understand (I think). So, the problem with the first Makefile has something to do with non-terminal match-anything rules. I have read several times all sections of the GNU make ma

Re: Chain of pattern rule and non-terminal match-anything rule

2019-01-11 Thread Renaud Pacalet
On 10/01/2019 11:55, Renaud Pacalet wrote: > With the following Makefile: > > # Makefile > %.dat: aa > touch $@ > > %: > mkdir -p $@ > > invoking `make -d aa/bb.dat` produces: > ... > Must remake target 'aa/bb.dat'. > ma

Re: Building some targets serially, others in parallel

2020-08-23 Thread Renaud Pacalet
). So, if you want to build all your object files with one single execution of a recipe, and if you use GNU make 4.3, you could try: $(OBJECTS) &: $(SOURCES) $(COMPILER) -j4 $^ ... This tells make that all object files are built by a single execution of the recipe. One last improvement would be

Re: Make's assumption that files it does not create do not change

2022-04-13 Thread Renaud Pacalet
nnatural. It even happened that somebody else decided to "fix" them because I had forgotten to add a big "don't touch" comment. I am very happy too that this feature exists. -- Renaud Pacalet Télécom Paris Campus SophiaTech 450 Route des Chappes, CS 50193 06904 Biot Sophi

Multiple rules for same target: what is the order of prerequisites in $^ and what does $< expand to?

2023-09-27 Thread Renaud Pacalet
Dear all, I read the manual carefully (especially section 4.11 "Multiple Rules for One Target") and searched the help-make archives but couldn't find a clear description of how $^ and $< are computed when there are several rules for the same target and only one has a recipe. According the man

Re: Multiple rules for same target: what is the order of prerequisites in $^ and what does $< expand to?

2023-09-27 Thread Renaud Pacalet
On 9/27/23 16:32, Bahman Movaqar wrote: On Wed, 2023-09-27 at 12:16 +0200, Renaud Pacalet wrote: 3. Ignore all other implicit rules (which seems to contradict 4.11). Make only ignores the implicit rules for which there are explicit/static equivalents. Thanks for your answer, Bahman. Not

Re: Multiple rules for same target: what is the order of prerequisites in $^ and what does $< expand to?

2023-09-27 Thread Renaud Pacalet
he first prerequisite of the rule with a recipe but is this always the case? I couldn't find this in the manual. Moreover, what if the rule with a recipe has no prerequisites? Which one, listed in another rule, becomes $ regards, Mark Am 27.09.2023 um 12:17 schrieb Renaud Pacalet : Dear all, I re

Re: Multiple rules for same target: what is the order of prerequisites in $^ and what does $< expand to?

2023-09-28 Thread Renaud Pacalet
On 9/27/23 21:39, Philip Guenther wrote: On Wed, Sep 27, 2023 at 7:52 AM Renaud Pacalet mailto:renaud.paca...@telecom-paris.fr>> wrote: On 9/27/23 16:32, Bahman Movaqar wrote: > On Wed, 2023-09-27 at 12:16 +0200, Renaud Pacalet wrote: > >> 3. Ignore

Re: Multiple rules for same target: what is the order of prerequisites in $^ and what does $< expand to?

2023-10-01 Thread Renaud Pacalet
On 28/09/2023 15:41, Paul Smith wrote: On Wed, 2023-09-27 at 16:50 +0200, Renaud Pacalet wrote: Thanks for your answer, Bahman. Not sure what "equivalent" means but with the following Makefile: %.a: %.b a.a: a.c echo $^ The first pattern rule here does not define a pattern

Re: [HELP] PHONY pattern rule makes the file w/ the same name

2023-10-05 Thread Renaud Pacalet
1-by-scenario1 because mk/scenario1.mk depends on it 2. mk/scenario1.mk 3. foo2 because mk/scenario2.mk depends on it 4. mk/scenario2.mk 5. scenario1.first-scenario 6. sep 7. scenario2.second-scenario The out is thus normal. -- Renaud Pacalet Télécom Paris Campus SophiaTech 450 Route des Chappes, C

Re: Hot to write pattern rules for suffix deletion

2024-01-04 Thread Renaud Pacalet
ARGETS) $(DGZES): %.envsubst: %.envsubst.gz gunzip -dc $< > $@ $(TARGETS): %: %.envsubst envsubst < $< > $@ -- Stephen Touset -- Renaud Pacalet Télécom Paris Campus SophiaTech 450 Route des Chappes, CS 50193 06904 Biot Sophia Antipolis cedex, FRANCE Tel : +33 (0) 4 9300 8402 Web : http://www.telecom-paris.fr/

Re: suppress "target '*' given more than once in the same rule"

2024-06-26 Thread Renaud Pacalet
$(unique $(FOO_DIR) $(BAH_DIR)): ? $(sort $(FOO_DIR) $(BAH_DIR)); it sorts (in your case you don't care) and removes duplicates. Francis Belliveau Consultant Lincoln Laboratory, Massachusetts Institute of Technology 244 Wood Street Lexington, MA 02421-6426 -- Renaud Pacalet Té

Re: Handling '=' in a filename together with $(eval )

2025-02-13 Thread Renaud Pacalet
On 2/13/25 15:46, Alejandro Colomar wrote: touch: cannot touch 'obj/asd=fgh': No such file or directory This seams to be a 'touch' error, not 'make'. What shell are you using? Does it support unquoted '=' in file names? Does the 'obj' direc

patsubst strange behavior when substituting the empty string

2025-05-29 Thread Renaud Pacalet
` I read the manual twice but I cannot explain this behavior. What did I miss? -- Renaud Pacalet Télécom Paris Campus SophiaTech 450 Route des Chappes, CS 50193 06904 Biot Sophia Antipolis cedex, FRANCE Tel : +33 (0) 4 9300 8402 Web : http://www.telecom-paris.fr/

Re: patsubst strange behavior when substituting the empty string

2025-05-29 Thread Renaud Pacalet
- Original Message - > From: "Paul Smith" > To: "Renaud Pacalet" , help-make@gnu.org > Sent: Thursday, May 29, 2025 2:59:04 PM > Subject: Re: patsubst strange behavior when substituting the empty string > On Thu, 2025-05-29 at 09:43 +0200, Renaud Paca