From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <05686ff913fd0fe9fcd1c97f2385a24e@mail.gmx.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] mkfile question: mklib & co. From: "Sascha Retzki" Date: Sat, 5 Aug 2006 19:06:48 +0200 In-Reply-To: <20060805164959.60ec4362.20h@r-36.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 976f8058-ead1-11e9-9d60-3106f5b1d025 > Good day. > > Am Sat, 5 Aug 2006 10:34:10 +0200 > "Sascha Retzki" schrieb: > >> got a question regarding /sys/src/cmd/mklib, why aren't HFILES copied to /$objtype/include? >> >> I mean, the library itsself is copied to LIBDIR, \o/ , but the headerfiles are not copied. It would be great if mk can at least copy them. > > Why does this need to be in the default mk file? > Because those can then be used to not reinvent the wheel for 3rd-party library programmers. Currently, you either do: > installheader: > cp *.h /sys/include > and then mention that target in your README ("who reads files named README?" ;) ). or you rewrite half of mklib in your own mkfile. > But beware that you need the rights to write there, so it is better to have > $HOME/include and bind it before /sys/include, in your profile. > Or HDIR: install: cp $LIB $LIBDIR/ for (i in $HFILES) { cp $HFILES $HDIR/ } I did that in every library I have written up to date (and I deleted every single one of them up to date, btw ;)) >> Something related: Does $objtype work in #pragma lib? If not, mk would have to put in #pragma lib to make library distribution a pleasure. > I found out you don't actually have *any* path in there, just #pragma lib "libf00.a". It will just work(tm). > You write the library, so you put it there. > > Sincerely, > > Christoph