@@ -807,7 +807,8 @@ SubDirs += $(DIRS)
807
807
ifneq ($(PROJ_SRC_ROOT ) ,$(PROJ_OBJ_ROOT ) )
808
808
$(RecursiveTargets ) ::
809
809
$(Verb ) for dir in $( DIRS) ; do \
810
- if [ ! -f $$ dir/Makefile ]; then \
810
+ if ([ ! -f $$ dir/Makefile ] || \
811
+ [ $$ dir/Makefile -ot $( PROJ_SRC_DIR) /$$ dir/Makefile ]); then \
811
812
$(MKDIR ) $$ dir; \
812
813
$(CP ) $(PROJ_SRC_DIR ) /$$ dir/Makefile $$ dir/Makefile; \
813
814
fi ; \
@@ -829,7 +830,8 @@ endif
829
830
ifdef EXPERIMENTAL_DIRS
830
831
$(RecursiveTargets ) ::
831
832
$(Verb ) for dir in $( EXPERIMENTAL_DIRS) ; do \
832
- if [ ! -f $$ dir/Makefile ]; then \
833
+ if ([ ! -f $$ dir/Makefile ] || \
834
+ [ $$ dir/Makefile -ot $( PROJ_SRC_DIR) /$$ dir/Makefile ]); then \
833
835
$(MKDIR ) $$ dir; \
834
836
$(CP ) $(PROJ_SRC_DIR ) /$$ dir/Makefile $$ dir/Makefile; \
835
837
fi ; \
@@ -863,7 +865,9 @@ unitcheck:: $(addsuffix /.makeunitcheck,$(PARALLEL_DIRS))
863
865
ParallelTargets := $(foreach T,$(RecursiveTargets ) ,% /.make$(T ) )
864
866
865
867
$(ParallelTargets ) :
866
- $(Verb ) if [ ! -f $( @D) /Makefile ]; then \
868
+ $(Verb ) if ([ ! -f $( @D) /Makefile ] || \
869
+ [ $( @D) /Makefile -ot \
870
+ $(PROJ_SRC_DIR)/$(@D)/Makefile ]); then \
867
871
$(MKDIR) $(@D); \
868
872
$(CP) $(PROJ_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \
869
873
fi; \
@@ -882,7 +886,8 @@ ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
882
886
$(RecursiveTargets ) ::
883
887
$(Verb ) for dir in $( OPTIONAL_DIRS) ; do \
884
888
if [ -d $( PROJ_SRC_DIR) /$$ dir ]; then\
885
- if [ ! -f $$ dir/Makefile ]; then \
889
+ if ([ ! -f $$ dir/Makefile ] || \
890
+ [ $$ dir/Makefile -ot $( PROJ_SRC_DIR) /$$ dir/Makefile ]); then \
886
891
$(MKDIR ) $$ dir; \
887
892
$(CP ) $(PROJ_SRC_DIR ) /$$ dir/Makefile $$ dir/Makefile; \
888
893
fi ; \
0 commit comments