122 lines
		
	
	
	
		
			3.9 KiB
		
	
	
	
		
			Groff
		
	
	
	
	
	
			
		
		
	
	
			122 lines
		
	
	
	
		
			3.9 KiB
		
	
	
	
		
			Groff
		
	
	
	
	
	
.\" Copyright (c) 1987, 1990, 1993
 | 
						|
.\"	The Regents of the University of California.  All rights reserved.
 | 
						|
.\"
 | 
						|
.\" Redistribution and use in source and binary forms, with or without
 | 
						|
.\" modification, are permitted provided that the following conditions
 | 
						|
.\" are met:
 | 
						|
.\" 1. Redistributions of source code must retain the above copyright
 | 
						|
.\"    notice, this list of conditions and the following disclaimer.
 | 
						|
.\" 2. Redistributions in binary form must reproduce the above copyright
 | 
						|
.\"    notice, this list of conditions and the following disclaimer in the
 | 
						|
.\"    documentation and/or other materials provided with the distribution.
 | 
						|
.\" 3. All advertising materials mentioning features or use of this software
 | 
						|
.\"    must display the following acknowledgement:
 | 
						|
.\"	This product includes software developed by the University of
 | 
						|
.\"	California, Berkeley and its contributors.
 | 
						|
.\" 4. Neither the name of the University nor the names of its contributors
 | 
						|
.\"    may be used to endorse or promote products derived from this software
 | 
						|
.\"    without specific prior written permission.
 | 
						|
.\"
 | 
						|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 | 
						|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 | 
						|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 | 
						|
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 | 
						|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 | 
						|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 | 
						|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 | 
						|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 | 
						|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 | 
						|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 | 
						|
.\" SUCH DAMAGE.
 | 
						|
.\"
 | 
						|
.\"     @(#)mkdep.1	8.1 (Berkeley) 6/6/93
 | 
						|
.\" jpman %Id: mkdep.1,v 1.3 1997/08/20 12:35:25 horikawa Stab %
 | 
						|
.\"
 | 
						|
.Dd June 6, 1993
 | 
						|
.Dt MKDEP 1
 | 
						|
.Os BSD 4.2
 | 
						|
.Sh ̾¾Î
 | 
						|
.Nm mkdep
 | 
						|
.Nd Makefile ¤Î°Í¸´Ø·¸¥ê¥¹¥È¤ò¹½ÃÛ¤¹¤ë
 | 
						|
.Sh ½ñ¼°
 | 
						|
.Nm
 | 
						|
.Op Fl ap
 | 
						|
.Op Fl f Ar file
 | 
						|
.Op Ar flags
 | 
						|
.Ar file ...
 | 
						|
.Sh ²òÀâ
 | 
						|
.Nm
 | 
						|
¤Ï C ¥³¥ó¥Ñ¥¤¥é¤Ø¤Î¥Õ¥é¥°¤È C ¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¥ê¥¹¥È¤ò°ú¿ô¤Ë¤È¤ê¡¢
 | 
						|
¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë¤Î°Í¸´Ø·¸¥ê¥¹¥È¤ò¹½ÃÛ¤·¡¢
 | 
						|
¥Õ¥¡¥¤¥ë ``.depend'' ¤Ë½ñ¤½Ð¤·¤Þ¤¹¡£
 | 
						|
Î㤨¤Ð Makefile ¤Ë¤ª¤¤¤Æ¤Ï°Ê²¼¤Î¤è¤¦¤ËÍѤ¤¤é¤ì¤Þ¤¹:
 | 
						|
.Bd -literal -offset indent
 | 
						|
CFLAGS= -O -I../include
 | 
						|
SRCS= file1.c file2.c
 | 
						|
 | 
						|
depend:
 | 
						|
	mkdep ${CFLAGS} ${SRCS}
 | 
						|
.Ed
 | 
						|
.Pp
 | 
						|
¤³¤³¤Ç¥Þ¥¯¥í SRCS ¤Ï C ¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¥ê¥¹¥È¤Ç¤¢¤ê¡¢
 | 
						|
CFLAGS ¤Ï C ¥³¥ó¥Ñ¥¤¥é¤ØÍ¿¤¨¤ë¥Õ¥é¥°¤Î¥ê¥¹¥È¤Ç¤¹¡£
 | 
						|
.Pp
 | 
						|
¥æ¡¼¥¶¤Ï¡¢»ÈÍѤ¹¤ë¥×¥ê¥×¥í¥»¥Ã¥µ¤È¥×¥ê¥×¥í¥»¥Ã¥µ¥ª¥×¥·¥ç¥ó¤òÊѹ¹²Äǽ¤Ç¤¹¡£
 | 
						|
Î㤨¤Ð¡¢gcc ¤ò¥×¥ê¥×¥í¥»¥Ã¥µ¤È¤·¤Æ»ÈÍѤ·¡¢¥·¥¹¥Æ¥à¤Î¥Ø¥Ã¥À¤ò̵»ë¤¹¤ë¤Ë¤Ï¡¢
 | 
						|
¼¡¤Î¤è¤¦¤Ë¤·¤Þ¤¹:
 | 
						|
.Bd -literal -offset indent
 | 
						|
depend:
 | 
						|
	env MKDEP_CPP="gcc -E" MKDEP_CPP_OPTS=-MM mkdep \\
 | 
						|
		${CFLAGS} ${SRCS}
 | 
						|
.Ed
 | 
						|
.Pp
 | 
						|
¥ª¥×¥·¥ç¥ó¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹:
 | 
						|
.Bl -tag -width Ds
 | 
						|
.It Fl a
 | 
						|
·ë²Ì¤ò½ÐÎÏ¥Õ¥¡¥¤¥ë¤ËÄɲä·¤Þ¤¹¡£
 | 
						|
¤³¤ì¤Ë¤è¤êƱ°ì¤Î Makefile ¤«¤é
 | 
						|
.Nm
 | 
						|
¤òÊ£¿ô²ó¼Â¹Ô¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
 | 
						|
.It Fl f
 | 
						|
¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë°Í¸´Ø·¸¤ò¡¢¥Ç¥Õ¥©¥ë¥È¤Î ``.depend'' ¤Ç¤Ï¤Ê¤¯¡¢¥Õ¥¡¥¤¥ë
 | 
						|
.Ar file
 | 
						|
¤Ë½ñ¤½Ð¤·¤Þ¤¹¡£
 | 
						|
.It Fl p
 | 
						|
°Í¸´Ø·¸¤ò°Ê²¼¤Î·Á¼°¤Ç½ÐÎϤ·¤Þ¤¹:
 | 
						|
.Bd -literal -offset indent
 | 
						|
program: program.c
 | 
						|
.Ed
 | 
						|
.Pp
 | 
						|
¤³¤ì¤Ë¤è¤ê¡¢¸å³¤Î make ¤ÏÃæ´Ö¥Õ¥¡¥¤¥ë
 | 
						|
.Pa \&.o
 | 
						|
¤ò·Ð¤ë¤³¤È¤Ê¤¯¡¢Ä¾ÀÜ C ¤Î¥½¡¼¥¹¥â¥¸¥å¡¼¥ë¤«¤é
 | 
						|
.Ar program
 | 
						|
¤òÀ¸À®¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
 | 
						|
¤³¤Îµ¡Ç½¤Ï¡¢¥½¡¼¥¹¤¬Ã±°ì¤Î¥â¥¸¥å¡¼¥ë¤«¤é¹½À®¤µ¤ì¤Æ¤¤¤ë¥×¥í¥°¥é¥à¤ËÊØÍø¤Ç¤¹¡£
 | 
						|
.El
 | 
						|
.Sh ´ØÏ¢¹àÌÜ
 | 
						|
.Xr cc 1 ,
 | 
						|
.Xr cpp 1 ,
 | 
						|
.Xr make 1
 | 
						|
.Sh ´ØÏ¢¥Õ¥¡¥¤¥ë
 | 
						|
.Bl -tag -width .depend -compact
 | 
						|
.It Pa .depend
 | 
						|
°Í¸´Ø·¸¥ê¥¹¥È¤ò´Þ¤à¥Õ¥¡¥¤¥ë
 | 
						|
.El
 | 
						|
.Sh ´Ä¶ÊÑ¿ô
 | 
						|
.Bl -tag -width MKDEP_CPP_OPTS
 | 
						|
.It Ev CC
 | 
						|
»ÈÍѤ¹¤ë C ¥³¥ó¥Ñ¥¤¥é¤ò»ØÄꤷ¤Þ¤¹¡£
 | 
						|
»ØÄꤵ¤ì¤¿¥³¥ó¥Ñ¥¤¥é¤Ï¡¢
 | 
						|
GNU C ¥³¥ó¥Ñ¥¤¥é¤È°ì´ÓÀ¤Î¤¢¤ë¥ª¥×¥·¥ç¥ó¤ò»ý¤Ä¤È²¾Äꤵ¤ì¤Þ¤¹¡£
 | 
						|
.It Ev MKDEP_CPP
 | 
						|
»ÈÍѤ¹¤ë¥×¥ê¥×¥í¥»¥Ã¥µ¤ò»ØÄꤷ¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ï "${CC} -E" ¤Ç¤¹¡£
 | 
						|
.It Ev MKDEP_CPP_OPTS
 | 
						|
¥×¥ê¥×¥í¥»¥Ã¥µ¤ËÂФ¹¤ë CFLAGS °Ê³°¤Î¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤Þ¤¹¡£
 | 
						|
¥Ç¥Õ¥©¥ë¥È¤Ï "-M" ¤Ç¤¹¡£
 | 
						|
.El
 | 
						|
.Sh Îò»Ë
 | 
						|
.Nm
 | 
						|
¥³¥Þ¥ó¥É¤Ï
 | 
						|
.Bx 4.3 Tahoe
 | 
						|
¤«¤éÅо줷¤Þ¤·¤¿¡£
 |