わいえむねっと

Contents
Categories
Calendar
2007/09
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
Monthly Archives
~2000/01
Recent Entries
RSS1.0
Templates
Information
Processed: 0.053 sec
Chashed: -
2007/09/11 Tue
雨は振るだろうけどあえて傘は持たず。
でも豚角煮まんは食べて。
そんな朝です。 昨日のそれの追記とか。

dependファイルが

$ cat foo.d
foo.o: foo.cc foo.h bar/bar.h
bar.o: bar/bar.cc bar/bar.h

とかの場合に、dependファイルを加工するのではなく、

OBJS        =   $(SRCS:%.cc=%.o)


OBJS        =   $(notdir $(SRCS:%.cc=%.o))

とかしてbar/bar.ccからbar.oをつくろうとしても暗黙ルールには

%.o: %.cc
    $(COMPILE.cc) $(OUTPUT_OPTION) $<

とかしかなく、bar.o: bar/bar.ccに合致するものがないため、コンパイルされないままリンクまで進んでリンカエラー。
Perlコマンドラインスイッチ挙動。

$ echo|perl -0pe 'print ord $/'
0
$ echo|perl -08pe 'print ord $/'
Unrecognized switch: -8peprint ord $/  (-h will show valid options).
$ echo|perl -0377pe 'print ord $/'
255
$ echo|perl -p0377e 'print ord $/'
255
$ echo|perl -0400pe 'print ord $/'
0
$ echo|perl -0401pe 'print ord $/'
0
$ echo|perl -0ep 'print ord $/'
$ echo|perl -e0p 'print ord $/'
Bareword found where operator expected at -e line 1, near "0p"
        (Missing operator before p?)
syntax error at -e line 1, next token ???
Execution of -e aborted due to compilation errors.
$ echo|perl -ep0 'print ord $/'
$ echo|perl -pe0 'print ord $/'
Can't open print ord $/: そのようなファイルやディレクトリはありません.
デミタスとデミタスとデミタスは相変わらずで。