9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Sascha Retzki" <sretzki@gmx.de>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] mkfile question: mklib & co.
Date: Sat,  5 Aug 2006 19:06:48 +0200	[thread overview]
Message-ID: <05686ff913fd0fe9fcd1c97f2385a24e@mail.gmx.net> (raw)
In-Reply-To: <20060805164959.60ec4362.20h@r-36.net>

> Good day.
> 
> Am Sat, 5 Aug 2006 10:34:10 +0200
> "Sascha Retzki" <sretzki@gmx.de> 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



  reply	other threads:[~2006-08-05 17:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-05  8:34 Sascha Retzki
2006-08-05 14:06 ` erik quanstrom
2006-08-05 14:27   ` Sascha Retzki
2006-08-05 14:19     ` erik quanstrom
2006-08-05 14:37       ` Sascha Retzki
2006-08-05 14:37         ` erik quanstrom
2006-08-05 14:52       ` Christoph Lohmann
2006-08-05 15:15         ` erik quanstrom
2006-08-05 14:49 ` Christoph Lohmann
2006-08-05 17:06   ` Sascha Retzki [this message]
2006-08-05 15:42 ` Russ Cox
2006-08-05 20:27   ` Charles Forsyth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05686ff913fd0fe9fcd1c97f2385a24e@mail.gmx.net \
    --to=sretzki@gmx.de \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).