Moriah Waterland writes: > > usr/src/pkgdefs/SUNWpkgcmdsu/Makefile > > > > 34-53: why is this so hard? Shouldn't it just be a series of echos > > in a single build rule? (Is building a depend file always this hard > > ... ?) > I don't know of any other proper way to build a package specific depend > file. Mark pointed me at a couple of packages that do this correctly: > SUNWnfscr, SUNWsasnm. We need the grep so that we won't end up with > duplicate dependencies if one of them is added to the common depend > file. There is probably a clever way of accomplishing this with just > one rule, but I didn't figure that there was a good ROI on figuring that > out for this particular Makefile.
OK. Mark followed up with private email, so I'm ok with this. I think his point was that, yes, it could be better, but since we're flushing it all, nobody cares much. I can go with that. > > usr/src/lib/libpkg/common/llib-lpkg > > > > I'm not sure what this file is for. It doesn't have any content. > > > Well, I did a search for the header files in libpkg and found that 9 of > the header files were included by code under usr/src/cmd/svr4pkg. I > included the following files in llib-lpkg: > cfext.h > keystore.h > nhash.h > p12lib.h > pkgerr.h > pkglib.h > pkglibmsgs.h > pkglocale.h > pkgweb.h I don't think I follow. The things in llib-lpkg should be *only* the header files that are required to define the interfaces exported by the library. Things internal to the library (at least some of the above appears to be internal) don't belong there. The llib-l* file is used to construct the lint library (*.ln). The lint library contains the interfaces for the library, so you can lint other things against the library without having to lint them against the library source. Because of this usage, you generally want to minimize the things defined in there to *just* the things you need, and nothing else. (The ideal lint library defines exactly the same set of symbols that are in the mapfile. It's usually hard to get to that ideal, because common headers are often needed to make the llib-l* file syntactically correct, but it shouldn't just be "everything.") -- James Carlson, Solaris Networking <james.d.carlson at sun.com> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677