[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: similar rules
From: |
Stepan Kasal |
Subject: |
Re: similar rules |
Date: |
Wed, 21 Jun 2006 22:21:33 +0200 |
User-agent: |
Mutt/1.4.2.1i |
Hello,
On Wed, Jun 21, 2006 at 09:51:31PM +0200, Torsten Mohr wrote:
> some rules in my Makefiles are quite similar, but
> not the same.
well, you can use
PARAMS = $(G) $(OPTS) -o $@ -c $<
$(OBJ_C): $(D_OBJ)/%.o : %.c
$(CC) $(PARAMS)
...
You could probably use target-specific values of a variable:
COMP = $(COMPILER) $(G) $(OPTS) -o $@ -c $<
$(OBJ_C): COMPILER = $(CC)
$(OBJ_C): $(D_OBJ)/%.o : %.c
$(COMP)
...
But none of these present any simplification in this case, where the
command is short.
Stepan Kasal
- similar rules, Torsten Mohr, 2006/06/21
- Re: similar rules,
Stepan Kasal <=