본문 바로가기

Linux/Makefile

notdir

[code]$(notdir names...)[/code]

이 함수는 names 에 있는 가가 파일 이름의 디렉토리 부분을 제외한 모든 것을 가져온다. 단 파일이름에 슬래쉬가 없다면 변화되지 않는다.

[code]$(notdir src/foo.c hacks)[/code]

위에 코드는 'foo.c hacks' 라는 결과를 만들어 낸다.

'Linux > Makefile' 카테고리의 다른 글

addprefix  (0) 2013.09.26
patsubst  (0) 2013.09.26
wildcard  (0) 2013.09.26
vpath  (0) 2013.09.26
override  (0) 2013.09.26