Test whether a directory exists inside a makefile

前端 未结 7 1427
-上瘾入骨i
-上瘾入骨i 2020-12-23 09:11

In his answer @Grundlefleck explains how to check whether a directory exists or not. I tried some to use this inside a makefile as follow:

foo.b         


        
7条回答
  •  梦毁少年i
    2020-12-23 09:27

    This approach functions with minimal echos:

    .PHONY: all
    all:
    ifneq ($(wildcard ~/Dropbox/.*),)
            @echo "Found ~/Dropbox."
    else
            @echo "Did not find ~/Dropbox."
    endif
    

提交回复
热议问题