make: multiple dependency lines and ..
Hans Buurman
hans at duttnph.tudelft.nl
Wed Jul 19 01:51:31 AEST 1989
I complained the other day about make, multiple dependency lines
and .. . I got one reply from Bradley White (bww at mtxinu.com),
which seems only appropriate to share with the net:
} The problem in your case though is with code to handle double suffix
} rules like:
}
} .c.o:
} cc -c $*.c
}
} In order to make it possible to redefine these rules, make throws
} away all but the last command set for any target that begins with '.'.
}
} So in your case
}
} ../dir/foo:
} touch file1 ../dir/foo
}
} ../dir/foo: file1
}
} turned into
}
} ../dir/foo:
}
} ../dir/foo: file1
}
} and so nothing was ever executed.
}
} The fix? Well, seeing as you can only ever have one rule set on
} a ':' target anyway, just make sure it is the last one. That is,
}
} ../dir/foo: file1
}
} ../dir/foo:
} touch file1 ../dir/foo
}
} will work just fine.
}
(...)
}
} I too consider the behaviour an aberration, and have proposed changing
} the rule for discarding previous command sets to "begins with a '.'
} AND doesn't contain a '/'" --- a suffix rule should never have a '/'.
Thanks to Bradley White for pointing this out. We agreed that it was
a bug indeed.
-----------------------------------------------------------------------------
Hans Buurman | hans at duttnph.tudelft.nl
Pattern Recognition Group | hans at duttnph.UUCP
Faculty of Applied Physics | mcvax!hp4nl!dutrun!duttnph!hans
Delft University of Technology | tel. 31 - (0) 15 - 78 46 94
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list