make-targets-dir.in 2.69 KB
Newer Older
1 2 3
all: message
	for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) $@) || exit 1; done

4 5 6 7 8
## Modifications:
##   Jeremy Meredith, Fri Jun 22 13:59:41 EDT 2007
##   Reverse order of subdirectories, and don't fail whole build
##   if there's an error.
##
9 10
clean:
	-$(RM) $(LIB)
11 12 13 14
	if test -n "$(SUBDIRS)"; then \
		rev=""; for dir in $(SUBDIRS); do rev="$$dir $$rev"; done; \
		for dir in $$rev; do (cd $$dir && $(MAKE) $@); done \
	fi
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
	-$(RM) $(CLEAN_FILES)

## Same as `clean' and then remove Emacs backup files, .depend files,
## core dumps, Makefiles, and any files listed in DISTCLEAN_FILES.  Then
## go to the temporary include directory and remove those copies of the
## public header files.
##
## The Makefile line is separate from the *~, .depend and core line
## because some rm's won't get to Makefile if there are no backup files,
## .depend files, or core files.
##
## The DISTCLEAN_FILES variable is something that only exists in some
## Makefiles.  It is used to specify additional files that need to be
## removed when doing a distclean.  Since distclean is used to get rid of
## anything that can be automatically generated, the files that are in
## DISTCLEAN_FILES are things that are generated through *.in files by
## configure.
##
hrchilds's avatar
hrchilds committed
33 34 35 36 37
## Modifications:
##  
##   Jeremy Meredith (via Hank Childs), Thu May 17 08:20:46 PDT 2007
##   Remove .pardepend file.
##
38 39 40 41 42 43 44
##   Jeremy Meredith, Thu Aug 30 12:58:48 EDT 2007
##   The distclean should not reference the clean target here since
##   we're descending into subdirectories; this would mean the clean
##   target gets executed for all directories, then the distclean target
##   for all directories.  We just want the latter, so I copied the
##   non-subdir referencing stuff from the clean target to distclean.
##
45 46 47
##   Jeremy Meredith, Thu Sep  6 17:04:36 EDT 2007
##   Try ALLSUBDIRS for distclean before resorting to SUBDIRS.
##
48
distclean:
49 50 51 52
	if test -n "$(ALLSUBDIRS)"; then \
		rev=""; for dir in $(ALLSUBDIRS); do rev="$$dir $$rev"; done; \
		for dir in $$rev; do (cd $$dir && $(MAKE) $@); done \
	elif test -n "$(SUBDIRS)"; then \
53 54 55
		rev=""; for dir in $(SUBDIRS); do rev="$$dir $$rev"; done; \
		for dir in $$rev; do (cd $$dir && $(MAKE) $@); done \
	fi
hrchilds's avatar
hrchilds committed
56
	-$(RM) $(DISTCLEAN_FILES) *~ .depend .pardepend core
57
	-$(RM) Makefile
58 59
	-$(RM) $(LIB)
	-$(RM) $(CLEAN_FILES)
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74

depend:
	for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) $@) || exit 1; done

checkdep:
	for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) $@) || exit 1; done

install: install_dirs
	for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) $@) || exit 1; done

install_lib: install_dirs
	for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) $@) || exit 1; done

install_bin: install_dirs
	for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) $@) || exit 1; done