building all targets in samba for install?

Michael Tokarev mjt at tls.msk.ru
Sat Nov 5 18:29:00 UTC 2022


Is there a way to build all targets needed for install?

The problem is that `make build' or `make' (or waf build)
doe not build stuff needed to install binaries, it builds
stuff needed to run binaries in place.

Usually, the build sequence of some software is:

  ./configure
  make
  make install

Where the last step does only copying of the already built
files.

But in samba, after doing regular build, it builds whole
thing once again (so `make' step is almost useless).

Is there something like `make install-targets' to perform
all compilation necessary for installing things, but not
the actual install procedure?  So that when `make install'
is run, it will only copy files, without compiling.

The problem at hand is that on debian, the install step is done
as different user (root) than build (to be able to set file
ownership right).  And the root does not have the same build
environment as the build user, so when things are being
compiled at the install time, it does not work right.

In order to overcome this, I currently use `make install'
twice: the first time, as the build user, to install things
into a scratch throw-away place, - just to force all things
to be built.  Next I remove the installed files, and perform
install once again, now as root, into proper place with
proper file ownership.

Is there a way to eliminate this middle fake install step?

Thanks!

/mjt



More information about the samba-technical mailing list