나는이 양식의 make
규칙을 작성하는 시도 :Make는 디렉토리로 전환하기 전에 의존성을 추구합니까?
lib%.so: computations/%.h
make -C computations/ -f makefile $<
출력 :
make -C computations/ -f makefile computations/test.h
make[1]: Entering directory `/home/shai/csm/csm2/src/computations'
make[1]: *** No rule to make target `computations/test.h'. Stop.
make[1]: Leaving directory `/home/shai/csm/csm2/src/computations'
make: *** [libtest.so] Error 2
음,이 라이브러리를 전환 한 후 %.h
를 찾는 것 같다. 아무 것도 아니야, 그냥 해봅니 다.
lib%.so: %.h
make -C computations/ -f makefile $<
하지만 이제 규칙이 전혀 인식되지 않습니다.
출력 :
[email protected]:~/csm/csm2/src$ make libtest.so
`make: *** No rule to make target `libtest.so'. Stop.
내 마음을 가지고 노는 make
인가? 종속성의 변경으로 대상을 인식하지 못하게 할 수 있습니까?
, 나는 단지이 이상한 규칙입니다났습니다. 대상이 아닌 종속성을 업데이트합니다. 그것은'make '가 어떻게 사용되어지기위한 것이 아닙니다. – eriktous