tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

make install clean dependencies

Context: in order to compile natively on a "small" ARM machine packages
that don't cross-compile, I wanted to speed up the process by putting
WRKOBJDIR on a tmpfs.

Obviously, I don't want to clutter the memory with useless files: once
installed, the package work dir shall be cleaned. This means that for
all dependencies make a "make install clean"

Solution: I wandered in pkgsrc/mk to see what to modify or what variable
I could set to obtain this. DEPENDS_TARGET was, almost, what I needed
when I stumbled upon the target "bin-install"

So typing :

$ make bin-install

does recursively fetch the binary package if available, compile it from
source if not and clean the dir when the dependency is installed.

One can suppress implicit searching on the Web by setting BINPKG_SITES

One unfelicity: if run not as privileged user, it first su to try to
pkg_add before perhaps finding there is not such package, before
dropping root and returning to build.

I guess that since the logics is in pkg_add this is where to put a flag
so that pkg_add only tries to define the full pathname of the package,
and returns empty if it can not find one, so that depending on this, the
mk chunk could whether su and call pkg_add with this FQpath or, not su
and go on compiling?

All in all, I think that the "make bin-install" clean dependencies as it
goes should be advertised.

And probably it should be the default (cleaning dependencies work
directory when installed) when "make install"?

        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

Home | Main Index | Thread Index | Old Index