OT: Format Makefilu
Karel Zak
zakkr na zf.jcu.cz
Pondělí Červenec 23 11:27:21 CEST 2001
On Mon, Jul 23, 2001 at 11:23:21AM +0200, Karel Dudasek wrote:
> On Mon, 23 Jul 2001, Peter Hanusiak wrote:
> > Dobre ale niekedy chcem pouzit nazov pseudo nazov pravidla namiesto
> > suboru. Ako mu mam potom povedat, ze toto nie je subor?
> >
> > all: etapa1 etapa2
> objects := $(patsubst %.do,%.doch,$(wildcard *.do))
>
> all: $(objects)
>
> %.doch: %.do
> ~/bin/dochazka -f $< > $@
>
> Staci ?
Jeste cistejsi reseni je take uvadet .PHONY:
Phony Targets
A phony target is one that is not really the name of a file. It is just a
name for some commands to be executed when you make an explicit request.
There are two reasons to use a phony target: to avoid a conflict with a
file of the same name, and to improve performance.
clean:
rm *.o temp
.PHONY : clean
Karel
--
Karel Zak <zakkr na zf.jcu.cz>
http://home.zf.jcu.cz/~zakkr/
C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
Další informace o konferenci Linux