pre fanusikov make

Jan Waclawek konfera na efton.sk
Čtvrtek Květen 9 14:26:09 CEST 2013


Co je zle na tomto makefile? Tabulatory su tam, kde treba. Preco nestaci
napisat "make", a musim napisat "make s.bin" aby mi to vyrobilo ten s.bin?
Ak do TARGET dam nieco ine, napr. "TARGET=t", tak "make" vytvori bez reci
t.bin.

(Podotykam, ze som to sam nedokazal vyriesit, musel mi napovedat kolega).

wek



-----

TARGET=s

all: bin

bin: $(TARGET).bin

%.bin : 
	@echo "Making $@"
	@echo $@ > $@

-----

c:\wek\SMO\tmp\tmp>make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-pc-mingw32

c:\wek\SMO\tmp\tmp>cat makefile
TARGET=s

all: bin

bin: $(TARGET).bin

%.bin :
        @echo "Making $@"
        @echo $@ > $@


c:\wek\SMO\tmp\tmp>make
make: *** No rule to make target `s.bin', needed by `bin'.  Stop.

c:\wek\SMO\tmp\tmp>make s.bin
Making s.bin

c:\wek\SMO\tmp\tmp>




Další informace o konferenci Hw-list