File: Makefile.depend

package info (click to toggle)
xmpi 2.2.3b6-6
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,820 kB
  • ctags: 1,716
  • sloc: cpp: 13,920; sh: 7,632; makefile: 328; csh: 125; ansic: 28; sed: 28
file content (37 lines) | stat: -rw-r--r-- 1,434 bytes parent folder | download
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 2000/09/08 01:53:43 bbarrett 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: $(SOURCEFILES)
	@ if test "$(SOURCEFILES)" != ""; then \
	  echo "$(MAKEDEPEND) $(DEPFLAGS) $(INCLUDES) $(INILIB_CXX_DEPDIRS) -- --" $(SOURCEFILES); \
	  $(MAKEDEPEND) $(DEPFLAGS) $(INCLUDES) $(INILIB_CXX_DEPDIRS) -- -- $(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;