From owner-man-jp-reviewer@jp.FreeBSD.org Sat Feb  7 20:45:16 2004
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id i17BjGX20909;
	Sat, 7 Feb 2004 20:45:16 +0900 (JST)
	(envelope-from owner-man-jp-reviewer@jp.FreeBSD.org)
Received: from mail504.nifty.com (mail504.nifty.com [202.248.37.212])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with ESMTP/inet id i17BjGC20903
	for <man-jp-reviewer@jp.FreeBSD.org>; Sat, 7 Feb 2004 20:45:16 +0900 (JST)
	(envelope-from CQG00620@nifty.ne.jp)
Received: from nifty.ne.jp (mcda026n049.ppp.infoweb.ne.jp [211.125.43.177])by mail504.nifty.com with ESMTP id i17BjBbP021989
	for <man-jp-reviewer@jp.FreeBSD.org>; Sat, 7 Feb 2004 20:45:12 +0900
Message-Id: <200402071145.i17BjBbP021989@mail504.nifty.com>
From: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
To: man-jp-reviewer@jp.FreeBSD.org
User-Agent: Wanderlust/2.10.0 (Venus) SEMI/1.14.4 (Hosorogi) FLIM/1.14.4
 (=?ISO-8859-4?Q?Kashiharajing=FE-mae?=) APEL/10.3 Emacs/21.2
 (i386--freebsd) MULE/5.0 (SAKAKI)
MIME-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi")
Content-Type: text/plain; charset=ISO-2022-JP
Reply-To: man-jp-reviewer@jp.FreeBSD.org
Precedence: list
Date: Sat, 07 Feb 2004 20:48:54 +0900
X-Sequence: man-jp-reviewer 4553
Subject: [man-jp-reviewer 4553] style.Makefile.5
Sender: owner-man-jp-reviewer@jp.FreeBSD.org
X-Originator: CQG00620@nifty.ne.jp
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+040130

$BEOJU0l42$G$9!#(B

style.Makefile.5$B$NK]Lu$,=PMh$^$7$?!#%l%S%e!<$r$*4j$$$7$^$9!#(B

$B<!$NJ8$,!"$I$&$K$b$&$^$/Lu$;$^$;$s!#<B9T%W%m%0%i%`(B($B$b$7$/$O%i%$%V%i%j(B)
$B$N0Y$NJQ?tJB$S!"$H2r<a$7$F$$$k$N$G$9$,(B($B0c$&$+$J(B?)$B!#(B

>> -order: i.e., ones for the primary program (or library) first.

---cut here---
--- style.Makefile.5.orig	Mon Feb  2 13:30:31 2004
+++ style.Makefile.5	Sat Feb  7 20:40:05 2004
@@ -30,46 +30,47 @@
 .Dd February 28, 2003
 .Dt STYLE.MAKEFILE 5
 .Os
-.Sh NAME
+.Sh $BL>>N(B
 .Nm style.Makefile
 .Nd
 .Fx
+$B$K$*$1$k(B
 .Pa Makefile
-file style guide
-.Sh DESCRIPTION
-This file specifies the preferred style for makefiles in the
+$B%U%!%$%k$N%9%?%$%k%,%$%I(B
+.Sh $B2r@b(B
+$B$3$N%U%!%$%k$O(B
 .Fx
-source tree.
+$B%=!<%9%D%j!<$N(B makefile $B$K9%$^$7$$%9%?%$%k$rL@5-$7$F$$$^$9!#(B
 .Bl -bullet
 .It
-All makefiles should have an SCM ID at the start of the file,
-followed by a blank line.
+$BA4$F$N(B makefile $B$O%U%!%$%k$N@hF,$K(B SCM ID $B$r;}$A!"$=$l$K6u9T$,B3$-$^$9!#(B
 .Bd -literal
 # $FreeBSD\&$
 
 .Ed
 .It
+$BI,MW$J$i$P!"<!$K(B
 .Cm .PATH :
-comes next if needed, and is spelled
-.Dq Li ".PATH: " ,
-with a single
-.Tn ASCII
-space after a colon.
-Do not use the
+$B$,B3$-$^$9!#(B
+.Dq Li ".PATH: "
+$B$N$h$&$K!"%3%m%s$N8e$KC10l$N(B
+.Tn $B%"%9%-!<(B
+$B%9%Z!<%9$,B3$/$h$&$KDV$j$^$9!#(B
 .Va VPATH
-variable.
+$BJQ?t$O;H$o$J$$$G$/$@$5$$!#(B
 .It
-Special variables (i.e.,
-.Va LIB , SRCS , MLINKS ,
-etc.) are listed in order of
-.Dq product ,
-then building and installing a binary.
-Special variables may also be listed in
+$BFC<lJQ?t(B ($BNc$($P(B
+.Va LIB $B!"(B SRCS $B!"(B MLINKS
+$B$J$I(B) $B$O(B
+.Dq product
+$B$N=g$KJB$Y$i$l!"$3$N8e$K%P%$%J%j$r%S%k%I$7$F%$%s%9%H!<%k$7$^$9!#(B
+$BFC<lJQ?t$O$^$?!"(B
 .Dq build
-order: i.e., ones for the primary program (or library) first.
-The general
+$B$N=g$K$bJB$Y$k$3$H$,=PMh$^$9!#(B
+$B$9$J$o$A!"<gMW$J%W%m%0%i%`(B ($B%i%$%V%i%j(B) $B$N$?$a$N$b$N$G$9!#(B
+$B0lHLE*$J(B
 .Dq product
-order is:
+$B$N=gHV$O$3$&$G$9(B:
 .Va PROG Ns / Ns Va LIB Ns / Ns Va SCRIPT
 .Va FILES
 .Va LINKS
@@ -80,10 +81,10 @@
 .Va WARNS
 .Va CFLAGS
 .Va DPADD
-.Va LDADD .
-The general
+.Va LDADD $B!#(B
+$B0lHLE*$J(B
 .Dq build
-order is:
+$B$N=gHV$O$3$&$G$9(B:
 .Va PROG Ns / Ns Va LIB Ns / Ns Va SCRIPT
 .Va SRCS
 .Va WARNS
@@ -94,129 +95,135 @@
 .Va FILES
 .Va LINKS
 .Oo Va NO Oc Ns Va MAN
-.Va MLINKS .
+.Va MLINKS $B!#(B
 .It
-Omit
-.Va SRCS
-when using
 .In bsd.prog.mk
-and there is a single source file named the same as the
-.Va PROG .
+$B$r;H$&$H$-$O(B
+.Va SRCS
+$B$r>JN,$7$^$9!#$3$N>l9g(B
+.Va PROG
+$B$HF1$8L>A0$N!"C10l$N%=!<%9%U%!%$%k$H$J$j$^$9!#(B
 .It
-Omit
-.Va MAN
-when using
 .In bsd.prog.mk
-and the manual page is named the same as the
-.Va PROG ,
-and is in section 1.
-.It
-All variable assignments are spelled
-.Dq Va VAR Ns Ic = ,
-i.e., no space between the variable name and the
-.Ic = .
-Keep values sorted alphabetically, if possible.
-.It
-Do not use
+$B$r;H$&$H$-$O(B
+.Va MAN
+$B$r>JN,$7$^$9!#$3$N>l9g(B
+.Va PROG
+$B$HF1$8L>A0$G!"%;%/%7%g%s(B 1 $B$N%^%K%e%"%k%Z!<%8$K$J$j$^$9!#(B
+.It
+$BA4$F$NJQ?t;XDj$O(B
+.Dq Va VAR Ns Ic =
+$B$N$h$&$KDV$j$^$9!#(B
+$B$D$^$j!"JQ?tL>$H(B
+.Ic =
+$B$N4V$K$O6uGr$rCV$-$^$;$s!#(B
+$B2DG=$J$i$P!"CM$O%"%k%U%!%Y%C%H=g$K%=!<%H$9$k$h$&$K$7$^$9!#(B
+.It
+$BJQ?t$r0l2s$@$1@_Dj$9$k(B
+($B$b$7$/$OJQ?t$r:G=i$K@_Dj$9$k(B)
+$B>l9g$K!"(B
 .Ic +=
-to set variables that are only set once
-(or to set variables for the first time).
+$B$r;H$&$N$O$d$a$F$/$@$5$$!#(B
 .It
-Do not use vertical whitespace in simple makefiles,
-but do use it to group locally related things in more complex/longer ones.
+$B4JC1$J(B makefile $B$G!"6u9T$r;H$&$N$O$d$a$F$/$@$5$$!#(B
+$B$7$+$7$h$jJ#;($GD9$$$b$N$KBP$7$F$O!"ItJ,E*$K4XO"$9$k9`L\$r(B
+$B$^$H$a$k$?$a$K;H$$$^$9!#(B
 .It
+$B4pK\E*$K(B
 .Va WARNS
-comes before
-.Va CFLAGS ,
-as it is basically a
+$B$O(B
 .Va CFLAGS
-modifier.
-It comes before
+$B$N=$>~;R$G$9$,!"(B
 .Va CFLAGS
-rather than after
+$B$NA0$KCV$-$^$9!#(B
+.Va WARNS
+$B$O=EMW$J$b$N$G$"$j!"BgNL$N(B
 .Va CFLAGS
-so it does not get lost in a sea of
+$B$N5-=R$NCf$G8+<:$o$J$$$h$&$K!"(B
 .Va CFLAGS
-statements as
-.Va WARNS
-is an important thing.
-The usage of
+$B$N8e$m$G$O$J$/$F!"(B
+.Va CFLAGS
+$B$NA0$KCV$-$^$9!#(B
+$B%3%^%s%I%i%$%s$d(B
+.Pa /etc/make.conf
+$B$G>e=q$-$G$-$k$h$&$K!"(B
 .Va WARNS
-is spelled
-.Dq Li "WARNS?=	" ,
-so that it may be overriden on the command line or in
-.Pa /etc/make.conf .
+$B$O(B
+.Dq Li "WARNS?=	"
+$B$N$h$&$KDV$j$^$9!#(B
 .It
 .Dq Li "NO_WERROR= yes"
-should not be used,
-it defeats the purpose of
-.Va WARNS .
-It should only be used on the command line and in special circumstances.
-.It
-.Va CFLAGS
-is spelled
-.Dq Li "CFLAGS+= " .
-.It
-Listing
-.Fl D Ns 's
-before
-.Fl I Ns 's
-in
-.Va CFLAGS
-is preferred for alphabetical ordering and to make
-.Fl D Ns 's
-easier to see.
-The
-.Fl D Ns 's
-often affect conditional compilation,
-and
-.Fl I Ns 's
-tend to be quite long.
-Split long
-.Va CFLAGS
-settings between the
-.Fl D Ns 's
-and
-.Fl I Ns 's.
+$B$O;H$&$Y$-$G$"$j$^$;$s!#$3$l$O(B
+.Va WARNS
+$B$NL\E*$rL58z$K$7$F$7$^$$$^$9!#(B
+$B$3$l$O%3%^%s%I%i%$%s$G!"$+$DFC<l$J>u67$G$N$_;HMQ$5$l$k$Y$-$G$9!#(B
+.It
+.Va CFLAGS
+$B$O(B
+.Dq Li "CFLAGS+= "
+$B$N$h$&$KDV$j$^$9!#(B
+.It
+.Va CFLAGS
+$B$K$*$$$F!"(B
+.Fl I
+$B$NA0$K(B
+.Fl D
+$B$N%j%9%H$rCV$/$N$O!"%"%k%U%!%Y%C%H=g$H$$$&E@$+$i$b!"$^$?(B
+.Fl D
+$B$r8+$d$9$/$9$kE@$+$i$b9%$^$7$$$3$H$G$9!#(B
+.Fl D
+$B$O$7$P$7$P>r7o$D$-$N%3%s%Q%$%k$K1F6A$7!"$^$?(B
+.Fl I
+$B$O0U30$KD9$/$J$j$,$A$G$9!#(B
+$BD9$$(B
+.Va CFLAGS
+$B$N@_Dj$G$O(B
+.Fl D
+$B$H(B
+.Fl I
+$B$N4V$GJ,3d$7$^$9!#(B
 .It
-Do not use GCCisms (such as
+.Va CFLAGS
+$B$K$*$$$F!"(B GCC $BE*$J$b$N(B (
 .Fl g
-and
-.Fl Wall )
-in
-.Va CFLAGS .
-.It
-Typically, there is one
-.Tn ASCII
-tab between
+$B$d(B
+.Fl Wall
+$B$H$$$C$?$b$N(B)
+$B$r;H$&$N$O$d$a$^$7$g$&!#(B
+.It
+$B0lHLE*$K$O(B
 .Va VAR Ns Ic =
-and the value in order to start the value in column 9.
-An
-.Tn ASCII
-space is allowed for variable names that extend beyond column 9.
-A lack of whitespace is also allowed for very long variable names.
+$B$HCM$N4V$K!"(B
+.Tn $B%"%9%-!<(B
+$B%?%V$r$R$H$DF~$l$^$9!#(B
+$BCM$,(B 9 $B7eL\$+$i;O$^$k$h$&$K$9$k$?$a$G$9!#(B
+$BJQ?tL>$,(B 9 $B7e$rD6$($k>l9g$O!"C10l$N(B
+.Tn $B%"%9%-!<(B
+$B%9%Z!<%9$GNI$$$G$9!#(B
+$B$^$?JQ?tL>$,$H$F$bD9$$>l9g$O!"%[%o%$%H%9%Z!<%9L5$7$G$bNI$$$G$9!#(B
 .It
 .Ic .include In bsd.*.mk
-goes last.
+$B$O:G8e$G$9!#(B
 .It
-Do not use anachronisms like
 .Va $<
-and
-.Va $@ .
-Instead use
+$B$d!"(B
+.Va $@
+$B$H$$$C$?;~Be:x8m$N$b$N$r;H$&$N$O$d$a$^$7$g$&!#(B
+$B$+$o$j$K(B
 .Va ${.IMPSRC}
-or
+$B$+(B
 .Va ${.ALLSRC}
-and
-.Va ${.TARGET} .
+$B!"$=$l$H(B
+.Va ${.TARGET}
+$B$r;H$$$^$9!#(B
 .El
 .Pp
-The desire to express a logical grouping often means not obeying some of the
-above.
-.Sh EXAMPLE
-The simplest program
+$BO@M}E*$J%0%k!<%WJ,$1$rI=8=$7$?$$$H$$$&MWK>$O!">e5-$N$I$l$+$K(B
+$B=>$o$J$$$H$$$&$3$H$r$7$P$7$P0UL#$7$^$9!#(B
+.Sh $B;HMQNc(B
+$B:G$b%7%s%W%k$J!"%W%m%0%i%`$N(B
 .Pa Makefile
-is:
+$B$G$9(B:
 .Bd -literal -offset indent
 # $FreeBSD\&$
 
@@ -225,9 +232,9 @@
 \&.include <bsd.prog.mk>
 .Ed
 .Pp
-The simplest library
+$B:G$b%7%s%W%k$J!"%i%$%V%i%j$N(B
 .Pa Makefile
-is:
+$B$G$9(B:
 .Bd -literal -offset indent
 # $FreeBSD\&$
 
@@ -238,15 +245,16 @@
 
 \&.include <bsd.lib.mk>
 .Ed
-.Sh SEE ALSO
+.Sh $B4XO"9`L\(B
 .Xr make 1 ,
 .Xr style 9
-.Sh HISTORY
-This manual page is inspired from the same source as
+.Sh $BNr;K(B
+$B$3$N%^%K%e%"%k%Z!<%8$O!"(B
+.Fx
+$B$N(B
 .Xr style 9
-manual page in
-.Fx .
-.Sh BUGS
-There are few hard and fast style rules here.
-The style of many things is too dependent on the context of the whole makefile,
-or the lines surrounding it.
+$B%^%K%e%"%k%Z!<%8$HF1$8%=!<%9$K1F6A$5$l$F$$$^$9!#(B
+.Sh $B%P%0(B
+$B$7$C$+$j$H$7$?%9%?%$%k5,B'$,!"$$$/$D$+$3$3$K$"$j$^$9!#(B
+$BB??t$N%9%?%$%k$,!"(B makefile $BA4BN$NFbMF!"$"$k$$$O$=$NA08e$N9T$K(B
+$B0MB8$72a$.$F$$$^$9!#(B
---cut here---

---
Watanabe Kazuhiro (CQG00620@nifty.ne.jp)
