[Bug #3473] make clear-installed-list

Bug #3473: make clear-installed-list
http://redmine.ruby-lang.org/issues/show/3473

e$B5/I<<Te(B: Usaku NAKAMURA
e$B%9%F!<%?%9e(B: Assigned, e$BM%@hEYe(B: Normal
e$BC4Ev<Te(B: Nobuyoshi N., e$B%+%F%4%je(B: build, Target version:
1.9.2
ruby -v: ruby 1.9.3dev (2010-06-24 trunk 28414) [i386-mswin32]

.installed.liste$B%U%!%$%k$r6u$K$9$k$?$a$K!“e(Bcommon.mke$B$Ne(Bclear-installed-liste$B%?!<%2%C%H$Ge(B
@set MAKE=”$(MAKE)" > $(INSTALLED_LIST)
e$B$J$k$b$N$r<B9T$7$F$$$^$9$,!"0d48$J$,$ie(Bnmakee$B$G$O4N?4$N%j%@%$%l%/%HIt$,<B9T$5$l$^$;$s!#e(B
e$B$3$N$3$H<+BN$Oe(Bnmakee$B$N%P%0$@$m$&$H;W$&$N$G$9$,!"7k2L$H$7$Fe(Binstalle$B$9$k$?$S$K$R$?$9$ie(B
.installed.liste$B$X$NDI5-$,9T$o$l$F$$$C$F$7$^$$$^$9!#e(B
(e$B;d$N>l9g!"e(B.installed.liste$B$,e(B40MBe$B$r1[$($k%5%$%:$K$J$C$F$$$?$N$G$3$NLdBj$K5$IU$-$^$7$?e(B)

e$B$G!“Nc$($Pe(B
@exit > $(INSTALLED_LIST)
e$B$K$G$b$9$l$PLdBj$O2r7h$9$k$N$G$9$,!”$J$+$@$5$s$K$h$k$H!"e(B

  • set MAKE= e$B$NItJ,$K$O0UL#$O$J$$e(B
  • e$B%3%^%s%I$,e(B$(MAKE)e$B$r4^$s$G$$$k$H!“e(Bmake -n
    e$B$G$”$C$F$b$=$N%3%^%s%I$,<B9T$5$l$ke(B
  • make -n install
    e$B$G<B:]$N%$%s%9%H!<%k$J$7$Ge(B.installed.liste$B$r:n$j$?$$$N$G$3$&$7$F$$$ke(B
    e$B$H$$$&OC$G$7$?!#e(B

e$B$G$9$,!“;d$N<B83$7$?8B$j!“e(BNetBSDe$B$Ne(Bmake(e$B$$$o$f$ke(Bportable
makee$B$H$7$FCN$i$l$F$$$kJ*e(B)
e$B$G$Oe(B$(MAKE)e$B$,$”$C$F$be(Bmake
-ne$B$G<B9T$5$l$k$3$H$O$”$j$^$;$s$G$7$?!#e(B
e$B;W$&$K!“$3$l$Oe(BGNU
makee$B$”$?$j$K8BDj$5$l$k5sF0$rMxMQ$7$F$$$k$N$G$O$J$$$+$H;W$$$^$9!#e(B

e$B$H$$$&$o$1$G!"e(B
(1) e$B$^$:e(B @set e$B$O$d$a$Fe(B @exit e$B$K$9$ke(B
(2)
e$B%$%s%9%H!<%k$J$7$Ge(B.installed.liste$B$r:n$k5!G=$,M_$7$$$J$i$PJLES$=$lMQ$N%?!<%2%C%H$re(B
e$B=Hw$9$ke(B e$B$Ne(B2e$BE@$rDs0F$7$^$9!#e(B e$BJ,N$H$7$F$Oe(B(1)e$B$,%W%i%C%H%U%)!<%`8BDj$Ne(BBuge$B!"e(B(2)e$B$,e(BFeaturee$B$K$J$k$+$H;W$$$^$9$,!"e(B
e$B$^$"J,$1$k$N$b$J$s$J$N$G%;%C%H$G=P$7$H$-$^$9!#e(B

2010e$BG/e(B6e$B7ne(B24e$BF|e(B19:41 Usaku NAKAMURA
[email protected]:

e$B$G$9$,!“;d$N<B83$7$?8B$j!“e(BNetBSDe$B$Ne(Bmake(e$B$$$o$f$ke(Bportable makee$B$H$7$FCN$i$l$F$$$kJ*e(B)
e$B$G$Oe(B$(MAKE)e$B$,$”$C$F$be(Bmake -ne$B$G<B9T$5$l$k$3$H$O$”$j$^$;$s$G$7$?!#e(B
e$B;W$&$K!“$3$l$Oe(BGNU makee$B$”$?$j$K8BDj$5$l$k5sF0$rMxMQ$7$F$$$k$N$G$O$J$$$+$H;W$$$^$9!#e(B

GNU e$BM3Mh$G$O$J$+$C$?$h$&$J!"$H;W$C$FD4$Y$?$i!"e(BSystem V
e$B$N$h$&$G$9!#e(B

http://www.opengroup.org/onlinepubs/009695399/utilities/make.html
e$B$Ne(B RATIONALE
e$B$KNr;KE*$J5sF0$NNc$H$7$F0J2<$N5-=R$,$"$2$i$l$F$$$^$9!#e(B

Specifying that command lines containing the strings “${MAKE}” and
“$(MAKE)” are executed when the -n option is specified (GNU and System
V)

In message [email protected]
on Thu, 24 Jun 2010 19:41:10 +0900,
Usaku NAKAMURA [email protected] wrote:

e$B$G$9$,!";d$N<B83$7$?8B$j!"e(BNetBSDe$B$Ne(Bmake(e$B$$$o$f$ke(Bportable makee$B$H$7$FCN$i$l$F$$$kJ*e(B)
pmakee$B!"e(Bparallel makee$B$G$7$g$&$J!#e(B

e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B

In message “[ruby-dev:41722] Re: [Bug #3473] make clear-installed-list”
on Jun.25,2010 01:35:51, [email protected] wrote:
| > e$B$G$9$,!";d$N<B83$7$?8B$j!“e(BNetBSDe$B$Ne(Bmake(e$B$$$o$f$ke(Bportable makee$B$H$7$FCN$i$l$F$$$kJe(B)
| > e$B$G$Oe(B$(MAKE)e$B$,$“$C$F$be(Bmake -ne$B$G<B9T$5$l$k$3$H$O$”$j$^$;$s$G$7$?!#e(B
| > e$B;W$&$K!“$3$l$Oe(BGNU makee$B$”$?$j$K8BDj$5$l$k5sF0$rMxMQ$7$F$$$k$N$G$O$J$$$+$H;W$$$^$9!#e(B
|
| GNU e$BM3Mh$G$O$J$+$C$?$h$&$J!"$H;W$C$FD4$Y$?$i!"e(BSystem V e$B$N$h$&$G$9!#e(B
|
| make
| e$B$Ne(B RATIONALE e$B$KNr;KE
$J5sF0$NNc$H$7$F0J2<$N5-=R$,$”$2$i$l$F$$$^$9!#e(B

e$B$$!“$”$j$,$H$&$4$6$$$^$9!#e(B
e$B$9$k$H!"!V$U$D$&!W$Ne(Bmakee$B$@$H<B9T$5$l$k$o$1$G$9$+!#e(B

e$B$H$$$&$N$O$H$b$+$/!“F0$+$se(Bmakee$B<BAu$r4{$Ke(B2e$BNc8+$D$1$A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