Makefile, targets and generated prerequisites?

Makefile, targets and generated prerequisites?

Post by J.F.Sebasti » Fri, 03 May 2002 00:53:27



I have a situation that I cannot solve.
Having a series of targets that should build the same way (ie the same
rule) but for which I cannot use static patterns, default rules, etc.
how do I do it?

## Suppose the list is:

TARGETS_LIST = a.b c.d d.e f.g
SRCDIR = some_path

## Where a.b depends on $(SRCDIR)/a and $(SRCDIR)/b and so on
## Can I write something like the following (first prerequisites takes
the name, the second the extension)?

$(TARGETS_LIST): $(SRCDIR)/$(basename $2) \



calculated?
Is there a simpler or saner way of doing this?

Thanks,
JF

 
 
 

1. Makefiles targets and "generated" prerequisites

I have a situation that I cannot solve.
Having a series of targets that should build the same way (ie the same
rule) but for which I cannot use static patterns, default rules, etc.
how do I do it?

## Suppose the list is:

TARGETS_LIST = a.b c.d d.e f.g
SRCDIR = some_path

## Where a.b depends on $(SRCDIR)/a and $(SRCDIR)/b and so on
## Can I write something like the following (first prerequisites takes
the name, the second the extension)?

$(TARGETS_LIST): $(SRCDIR)/$(basename $2) \



calculated?
Is there a simpler or saner way of doing this?

Thanks,
JF

2. Apache and images

3. Response: Makefile, targets and generated prerequisites?

4. PS/2 Mouse in X

5. sed/awk - generating Makefiles (Re: awk processing of Makefile macros)

6. Parts for a Diskless Computer

7. kconfig: Generate prerequisites

8. 2.4 and 3com 3c59x driver

9. add checkstack Makefile target

10. 'tags' target in makefile broken

11. what is the target "<built-in>" in a makefile?

12. Including a Makefile depending on the target

13. How to determine automatically in makefile the cpu target