I need to add some logic to a make file and I am stuck. I see several examples out there but I'm not sure which one is the right one for me.
What I have:
$(UBIN)/%:
$(CC) $(CFLAGS) -o $(UBIN)/$* $(OBJS) -L $(ORAHOME) $(ORALIBS) \
$(LNKPATH) $(DSTN_LIBS)
@echo ""
What I want:
$(UBIN)/%:
if the file $(UBIN)/$* exists
then
$(CC) $(CFLAGS) -o $(UBIN)/$* $(OBJS) -L $(ORAHOME) $(ORALIBS) \
$(LNKPATH) $(DSTN_LIBS)
@echo ""
endif
But I can't figure out what the right syntax is. Some idea were to use a wildcard string holder, some use some -a option, some use if some use ifeq some include semicolons and some do not.
The current list of make files we use has ZERO examples of this logic so I have nothing to compare it to for my build environment.
Many thanks