Supposons que j'ai un Makefile:dépendances dans Makefile
all: $(BINARY)
$(BINARY): $(OBJS) $(DEBUG_OBJS)
#Link objects here
$(OBJS): headers
#Compile code into objects without debug option
$(DEBUG_OBJS): headers
#Compile code into objects with debug option
headers:
#Create on-the-fly header files
Comme vous pouvez le voir, la cible headers
est nécessaire à la fois par $(OBJS)
et $(DEBUG_OBJS)
. La question est, sera headers
être appelé deux fois? En outre, le code ci-dessous serait égal/équivalent à ce qui précède:
all: $(BINARY)
$(BINARY): headers $(OBJS) $(DEBUG_OBJS)
#Link objects here
$(OBJS):
#Compile code into objects without debug option
$(DEBUG_OBJS):
#Compile code into objects with debug option
headers:
#Create on-the-fly header files
en ce que serait appelé avant en-têtes sont $(OBJS)
et $(DEBUG_OBJS)
par $(BINARY)
?
Merci beaucoup! – Sagar