-
-
Save gatspy/2e8dd5fa539c7a70d1ccaab941913b74 to your computer and use it in GitHub Desktop.
test if directory exists in a makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: txtfile | |
TARGET_DIR = target-dir | |
txtfile: $(TARGET_DIR) | |
touch $(TARGET_DIR)/file.txt | |
target-dir: | |
test ! -d $(TARGET_DIR) && mkdir $(TARGET_DIR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment