모든 도트 파일을 홈 디렉토리에 복사해야하는 Makefile이 있습니다. 불행히도 GNUMake
bash에서 사용되는 와일드 카드를 지원하지 않으며 일반적인 와일드 카드 $(wildcard *.c)
는 특수 파일 유형으로 제한됩니다.
내 Makefile 은 다음과 같습니다.
SHELL := /bin/bash
profile:
@cp -r profile/ $(HOME)/
.PHONY: profile
지금까지 시도한 다른 변형 :
cp -r profile/* $(HOME)
=> cp: cannot stat profile/*: No such file or directory
cp -r profile/$(wildcard *) $(HOME)
=> 현재 디렉토리의 모든 파일을 복사하려고합니다.cp -r $(wildcard profile/*) $(HOME)/
=> cp: missing destination file operand after /home/foobar
cp -r $(wildcard profile/*) $(HOME)/$(wildcard profile/*) =>
cp : / home / foobar` 뒤에 대상 파일 피연산자가 없습니다.이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다