building all targets in samba for install?

Andrew Bartlett abartlet at
Sat Nov 5 19:21:13 UTC 2022

On Sat, 2022-11-05 at 21:29 +0300, Michael Tokarev via samba-technical
> 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?

Not currently, but you could use the fake install step as your main
build step if you wanted to.

Andrew Bartlett

Andrew Bartlett (he/him)
Samba Team Member (since 2001)
Samba Developer, Catalyst IT

More information about the samba-technical mailing list