How common is :: in makefiles

Sven L Eriksson sveer at sssab.se
Thu Feb 21 03:44:29 AEST 1991


The X11 makefiles (produced by Imakefile) uses a feature that isn't
documented in my system (Sys V.3.2) although it works.
They use a double : instead of a single in the dependency rules.
This allows several rules with the same name. The effect is that
all these rules are executed. If a makefile contains:

foo ::
	@echo making foo

bar ::
	@echo making bar

foo ::
	@echo making more foo

then "make foo" will produce

making foo
making more foo

If single : are used instead make will complain.

Is this a general undocumented feature of make?
X11 is portable to a lot of platforms so I guess they have
thought about this. But do make on all systems have it?
Dare I use it in makefiles that are going to be ported to many
different systems.

Thanks for any responses. / Sven
-- 
- Sven L Eriksson, 3S AB (Scandinavian System Support AB)    o O___ _________
- Address: Agatan 4, Box 535, S-581 05 Linkoping, Sweden   _][__|o| |O O O O|
- Phone: +46-13-11 16 60    Fax: +46-13-11 51 93          <_______|-|_______|
- Email: sveer at sssab.se     UUCP: uunet!sunic!sssab!sveer  /O-O-O     o   o



More information about the Comp.unix.programmer mailing list