Home | History | Annotate | Download | only in testcase
      1 # expect protoc compile/link only once.
      2 test: foo
      3 
      4 foo: foo.o bar.o
      5 	echo link $@ from $<
      6 
      7 %.o: %.c FORCE_DO_CMD
      8 	echo compile $@ from $<
      9 
     10 .PHONY: FORCE_DO_CMD
     11 FORCE_DO_CMD:
     12 
     13 foo.c: | protoc
     14 
     15 foo.c: foo.proto
     16 	echo protoc $@ from $<
     17 
     18 foo.proto:
     19 
     20 bar.c: | protoc
     21 
     22 bar.c: bar.proto
     23 	echo protoc $@ from $<
     24 
     25 bar.proto:
     26 
     27 protoc: proto.o
     28 	echo link $@ from $<
     29 
     30 proto.c:
     31