Add 'makefiles' target to generate all makefiles. Work around Makefile rule deficiency (thanks to Colin Blake <colin@theblakes.com> for the patch). Some versions of make were having trouble finding Makefile.in in the source directory. Simplify the LOOP_OVER_DIRS action. No need to test for directories anymore. It's a requirement. Don't list a directory in DIRS if it doesn't have a Makefile.in or Makefile.

This commit is contained in:
slamm%netscape.com 1999-09-03 22:18:30 +00:00
Родитель 06201fcddd
Коммит 8012532337
1 изменённых файлов: 23 добавлений и 19 удалений

Просмотреть файл

@ -230,15 +230,11 @@ ifdef DIRS
LOOP_OVER_DIRS = \
@for d in $(DIRS); do \
$(UPDATE_TITLE); \
if test -f $$d/Makefile; then \
set $(EXIT_ON_ERROR); \
echo "cd $$d; $(MAKE) $@"; \
oldDir=`pwd`; \
cd $$d; $(MAKE) $@; cd $$oldDir; \
set +e; \
else \
echo "Skipping non-directory $$d..."; \
fi; \
set $(EXIT_ON_ERROR); \
echo "cd $$d; $(MAKE) $@"; \
oldDir=`pwd`; \
cd $$d; $(MAKE) $@; cd $$oldDir; \
set +e; \
$(CLICK_STOPWATCH); \
done
endif
@ -297,6 +293,17 @@ $(NFSPWD):
cd $(@D); $(MAKE) $(@F)
endif
# Target to only regenerate makefiles
makefiles: $(SUBMAKEFILES)
ifdef DIRS
@for d in $(filter-out $(STATIC_MAKEFILES), $(DIRS)); do\
$(UPDATE_TITLE); \
oldDir=`pwd`; \
echo "cd $$d; $(MAKE) $@"; \
cd $$d; $(MAKE) $@; cd $$oldDir; \
done
endif
export:: $(SUBMAKEFILES) $(MAKE_DIRS)
+$(LOOP_OVER_DIRS)
@ -686,14 +693,10 @@ endif #STRICT_CPLUSPLUS_SUFFIX
ifdef DIRS
$(DIRS)::
@if test -d $@; then \
set $(EXIT_ON_ERROR); \
echo "cd $@; $(MAKE)"; \
cd $@; $(MAKE); \
set +e; \
else \
echo "Skipping non-directory $@..."; \
fi; \
@set $(EXIT_ON_ERROR); \
echo "cd $@; $(MAKE)"; \
cd $@; $(MAKE); \
set +e; \
$(CLICK_STOPWATCH)
endif
@ -705,7 +708,8 @@ endif
Makefile: Makefile.in
@$(PERL) $(topsrcdir)/build/autoconf/make-makefile -d $(DEPTH)
$(SUBMAKEFILES): % : %.in
# VPATH does not work on some machines in this case, so add $(srcdir)
$(SUBMAKEFILES): % : $(srcdir)/%.in
@$(PERL) $(topsrcdir)/build/autoconf/make-makefile -d $(DEPTH) $@
###############################################################################
@ -1296,7 +1300,7 @@ endif
# Fake targets. Always run these rules, even if a file/directory with that
# name already exists.
#
.PHONY: all all_platforms alltags boot checkout clean clobber clobber_all export install libs realclean run_viewer run_apprunner $(DIRS) FORCE
.PHONY: all all_platforms alltags boot checkout clean clobber clobber_all export install libs makefiles realclean run_viewer run_apprunner $(DIRS) FORCE
# Used as a dependency to force targets to rebuild
FORCE: