Skip to content

Change default assumption for build target

Kristian Larsson requested to merge rearrange-build-targets into master

There are essentially two categories of make targets for nso-docker, the first of which expects to receive the NSO install file as input and the second which takes an NSO version number and derives the file name (and assumes the location, if not specified) to use for the build.

The default assumption would be that you would come with the file name, and thus the 'build' target would expect a FILE argument. In contrast, if you just wanted to specify the version number, you would have to run the 'build-version' target, named based on that the version is the expected input. For example, running 'make NSO_VERSION=5.3 build-version' would build based on NSO version 5.3. In practice, this means looking for nso-$(NSO_VERSION(.linux.x86-64.installer.bin in nso-install-files/ or wherever the $(NSO_INSTALL_FILER_DIR) variable is pointing.

Now, in real life I find we don't base our builds on the file but rather on the version number and that is why I am switching these two targets around. I.e. instead of calling 'build-version' we can now call 'build', which is shorter and more intuitive. I think specifying the NSO version and placing the file is also quite simple to understand, much more so than the FILE version of these targets.

  • build-file will build based on the file (expects FILE variable)
  • build-version will build based on the version (expects NSO_VERSION variable)
  • build will build based on the version (expects NSO_VERSION variable)

Now this is breaking because the 'build' target used to expect the FILE variable and not NSO_VERSION. However, I think there is no one using that invocation and so I'm fine with the change.

Edited by Kristian Larsson

Merge request reports