Sun May 12 11:16:58 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
[glibc.git] / sysdeps / mach / Makefile
bloba179b1f83eba2ea36396b683ae0b7e641e839956
1 # Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Library General Public License
6 # as published by the Free Software Foundation; either version 2 of
7 # the License, or (at your option) any later version.
9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Library General Public License for more details.
14 # You should have received a copy of the GNU Library General Public
15 # License along with the GNU C Library; see the file COPYING.LIB. If
16 # not, write to the Free Software Foundation, Inc., 675 Mass Ave,
17 # Cambridge, MA 02139, USA.
19 ifdef in-Makerules
21 # Look for header files in mach/ under the top-level library source directory.
22 includes += -I$(..)mach
24 ifneq (mach,$(subdir))
25 # Subdirectories other than mach/ might use the generated Mach headers.
26 # So make sure we get a chance to run in mach/ to make them before all else.
28 ifdef objpfx
29 mach-objpfx = $(objpfx)
30 else
31 mach-objpfx = $(..)mach/
32 endif
34 # These are all the generated files that <mach.h> includes.
35 mach-before-compile := $(mach-objpfx)mach-shortcuts.h \
36 $(patsubst %,$(mach-objpfx)mach/mach_%.h,\
37 interface port host)
39 # This patsubst generates patterns like `m%h-shortcuts.h', which are damn
40 # likely to match just the corresponding particular file we want.
41 $(patsubst mach%,m\%h%,$(mach-before-compile)): # Run only if doesn't exist.
42 $(MAKE) -C $(..)mach generated no_deps=t
44 before-compile += $(mach-before-compile)
45 endif
47 endif # in-Makerules