#---*- Makefile -*-------------------------------------------------------------
#$Author: antanas $
#$Revision: 9927 $
#$Date: 2024-04-09 14:42:11 +0300 (Tue, 09 Apr 2024) $
#$URL: svn+ssh://www.crystallography.net/home/coder/svn-repositories/cod-tools/tags/v3.10.0/makefiles/Makefile-subdirs $
#------------------------------------------------------------------------------

MAKECONF_FILES = $(sort $(filter-out %~, $(wildcard Makeconf*)))

ifneq ("$(MAKECONF_FILES)","")
include $(MAKECONF_FILES)
endif

# A Makeconfig file might contain a line like the following one:
# FIRST = f2mtz/
#
# The recursive Makefile will first descend to directories mentioned
# in $(FIRST), and then into all the rest alphabetically:

DIRS  = $(FIRST) $(filter-out $(FIRST), $(sort $(dir $(wildcard */[Mm]akefile))))

.PHONY: all check clean cleanAll distclean install test tests out output outputs

#------------------------------------------------------------------------------

all build check clean cleanAll distclean install test tests out output outputs listdiff:
	@for d in $(DIRS); do test -d $$d && $(MAKE) -C $$d $@; done

#------------------------------------------------------------------------------

MAKELOCAL_FILES = $(sort $(filter-out %~, $(wildcard Makelocal*)))

ifneq ("$(MAKELOCAL_FILES)","")
include $(MAKELOCAL_FILES)
endif
