[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Path prefix to src and targets
From: |
Erik Rull |
Subject: |
Path prefix to src and targets |
Date: |
Wed, 24 May 2023 23:51:17 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.15 |
Hi all,
I would like to realize the following:
How can I "automatically" prefix the current subdirectory in the included
Makefile relative to the "main" Makefile for all targets and source files?
directory tree:
Makefile
subdir_a/
Makefile
file.c
subdir_b/
subdir_c/
Makefile
file.c
Makefile
otherfile.c
When calling the "main" Makefile, the subdirectory-Makefiles get recursively
include'd into the mail Makefile and thus the targets from each sub-Makefile.
Problem here:
file.c will exist twice (and thus file.o as target) and the target rules might
miss the subdirectory-prefixes, so the build will not work properly.
Thanks.
Best regards,
Erik
- Path prefix to src and targets,
Erik Rull <=