File: Makefile.depend

package info (click to toggle)
mpich 1.2.5.3-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 53,880 kB
  • ctags: 44,904
  • sloc: ansic: 260,029; cpp: 91,556; sh: 42,421; java: 33,448; makefile: 8,959; fortran: 4,601; tcl: 3,548; f90: 3,517; perl: 2,251; asm: 999; csh: 856
file content (37 lines) | stat: -rw-r--r-- 1,352 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*- makefile -*-
# 
# $Id: Makefile.depend,v 1.1.1.1 2000/05/31 21:27:21 gropp Exp $
#
# Contains the "depend" target so that we can generate dependencies
# correctly.  Subdirectory-spanning part stolen from an
# automake-generated Makefile.  
#
# Instructions:
# - define SOURCEFILES macro in Makefile.am with all your .c/.cc sources.
# - define DEPFLAGS with all necessary -I, -D, etc., flags.
# - you may need to use something like LSC_CXX_CHECK_DEPDIRS in
#   configure.in to get the -I flags for the C++ compiler for the STL
#   and whatnot.
# - Put this file in your top-level directory, named "Makefile.depend"
# - put "include $(top_srcdir)/Makefile.depend" at the end of each 
#   Makefile.am.  *Every* Makefile.am in your tree must have a "depend" 
#   target.
#

depend:
	@ if test "$(SOURCEFILES)" != ""; then \
	  echo "$(MAKEDEPEND) $(DEPFLAGS) -- --" $(SOURCEFILES); \
	  $(MAKEDEPEND) $(DEPFLAGS) -- -- $(SOURCEFILES); \
	fi
	@set fnord $(MAKEFLAGS); amf=$$2; \
	if test "$(DEPDIRS)" = ""; then \
	  foo_dirs="$(SUBDIRS)"; \
	else \
	  foo_dirs="$(DEPDIRS)"; \
	fi; \
	target=`echo $@ | sed s/-recursive//`; \
	list="$$foo_dirs"; for subdir in $$list; do \
	  echo "Making $$target in $$subdir"; \
	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target) \
	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
	done;