나는이 같은 약 보이는 메이크 :
FIGURES = A1_B1_C1.eps A2_B2_C2.eps A3_B3_C3.eps
NUMBERS = 1 2 3
all : $(FIGURES)
%.eps : $(foreach num, $(NUMBERS), $(subst B, $(num), %).out)
# my_program($+, [email protected]);
%.out :
점 내 그림의 파일 이름 (A, B, C) 각각의 것을 특정 정보가 포함되어 있음 figure는 여러 (예제 3에서) 파일의 my_program에 의해 작성됩니다. 각 그림의 파일 이름은 다음과 같이에서 그림을 만들 수있는 형식 Ax_Bx_Cx.eps
, 데이터 파일의 이름을 가지고 있지만 :
Ax_1x_Cx.out
Ax_2x_Cx.out
Ax_3x_Cx.out
그래서 각 그림, 나는 여러 파일 이름을 가진 동적으로 생성 된 종속 목록이 필요 . 즉 위의 예에 대한 내 원하는 결과는 다음과 같습니다.
는# my_program (A1_11_C1.out A1_21_C1.out A1_31_C1.out, A1_B1_C1.eps);
# my_program (A2_12_C2.out A2_22_C2.out A2_32_C2.out, A2_B2_C2.eps);
# my_program (A3_13_C3.out A3_23_C3.out A3_33_C3.out, A3_B2_C3.eps); 불행하게도
subst
명령은 출력은 다음과 같습니다 위해, 무시하는 것 같다
나는 this possible duplicate에보고했다하지만 난 전제 조건에 확인을해야하는#의 my_program은 (A1_B1_C1.out A1_B1_C1.out A1_B1_C1.out, A1_B1_C1.eps);
# my_program (A2_B2_C2.out A2_B2_C2.out A2_B2_C2.out, A2_B2_C2.eps);
# my_program (A3_B3_C3.out A3_B3_C3.out A3_B3_C3.out, A3_B3_C3.eps);
%
하지
[email protected]
을 사용하고 있기 때문에 대답이 나를 도울 수 없다는 생각.
분명히 여기에 잘못된 것이 있습니다. 어떤 도움이라도 대단히 감사합니다.
대, 덕분에 많이! – Jenny