DEPLOY_PATH?=$(deploy_path)/output
GITIGNORE_RSC=$(shell [ -f .gitignore ] && sed ':a;N;s/\n/|/;ta' .gitignore)
DEPLOY_RSC=$(shell ls | sed 's/ /\n/g' | grep -vE "$(GITIGNORE_RSC)")gitdeploy:
install -d $(DEPLOY_PATH)
for FN in $(DEPLOY_RSC);do cp -r $$FN $(DEPLOY_PATH);doneshell
說明:該僞目標實現的是將工程中除了 .gitignore 文件中指定的忽略的文件或目錄,複製到部署目錄。ui
.gitignore 文件內容爲部署
Debugit
*.osed
*.sobug
outputgrep
.libs
文件
部署:make
make deploy DEPLOY_PATH=$suit_yourself_path