scalar: include in standard Git build & installation
commit7b5c93c6c6847b4b6037e38418bc8bbb8c2eada8
authorVictoria Dye <vdye@github.com>
Fri, 2 Sep 2022 15:56:43 +0000 (2 15:56 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 2 Sep 2022 17:02:55 +0000 (2 10:02 -0700)
tree34b4132caba91391031155d312c422b6c5a6f7ce
parentb6faef396f0380237deae144ee48caf5ee20ae1e
scalar: include in standard Git build & installation

Move 'scalar' out of 'contrib/' and into the root of the Git tree. The goal
of this change is to build 'scalar' as part of the standard Git build &
install processes.

This patch includes both the physical move of Scalar's files out of
'contrib/' ('scalar.c', 'scalar.txt', and 't9xxx-scalar.sh'), and the
changes to the build definitions in 'Makefile' and 'CMakelists.txt' to
accommodate the new program.

At a high level, Scalar is built so that:
- there is a 'scalar-objs' target (similar to those created in 029bac01a8
  (Makefile: add {program,xdiff,test,git,fuzz}-objs & objects targets,
  2021-02-23)) for debugging purposes.
- it appears in the root of the install directory (rather than the
  gitexecdir).
- it is included in the 'bin-wrappers/' directory for use in tests.
- it receives a platform-specific executable suffix (e.g., '.exe'), if
  applicable.
- 'scalar.txt' is installed as 'man1' documentation.
- the 'clean' target removes the 'scalar' executable.

Additionally, update the root level '.gitignore' file to ignore the Scalar
executable.

Signed-off-by: Victoria Dye <vdye@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.gitignore
Documentation/Makefile
Documentation/scalar.txt [moved from contrib/scalar/scalar.txt with 100% similarity]
Makefile
contrib/buildsystems/CMakeLists.txt
contrib/scalar/.gitignore [deleted file]
contrib/scalar/Makefile [deleted file]
contrib/scalar/t/Makefile [deleted file]
scalar.c [moved from contrib/scalar/scalar.c with 100% similarity]
t/t9210-scalar.sh [moved from contrib/scalar/t/t9099-scalar.sh with 96% similarity]