This is a pseudo code:
if .gitignore exists
GITIGNORE_PATH := .gitignore
else
GITIGNORE_PATH := ../.gitignore
fi
all:
do_build...
I tried to search this, but they always show how to do this inside rules, as in:
$(UBIN)/%:
@if [ -f '$@' ]; then \
$(CC) $(CFLAGS) -o '$@' $(OBJS) -L $(ORAHOME) $(ORALIBS) \
$(LNKPATH) $(DSTN_LIBS); \
echo ""; \
fi