]> git.ipfire.org Git - thirdparty/dracut.git/commit - Makefile
Makefile: merge main-version and git-version earlier
authorĐoàn Trần Công Danh <congdanhqx@gmail.com>
Fri, 6 Mar 2020 01:46:36 +0000 (08:46 +0700)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 6 Mar 2020 08:49:40 +0000 (09:49 +0100)
commiteb8a7a96351b6e1cfd9dc34f1e854333a8f4a4e0
treedc04e7b167c55eeccefeb0cd203454785fbb21f9
parent9e68789d66a6a383e5c46f687350897705c7994f
Makefile: merge main-version and git-version earlier

With GNU Make 4.3 on both ArchLinux, and VoidLinux,
GITVERION is always empty because of bad substitution.
Change '\#' to simply '#' can fix it,
but we don't need that complation.

We can merge DRACUT_MAIN_VERSION and GITVERSION into DRACUT_FULL_VERSION.
Because, GITVERSION will be attached back to DRACUT_MAIN_VERSION in all
situation.

While we're at it, detect if we're in git worktree by:
limiting GIT_CEILING_DIRECTORIES to parent directory of
dracut's top level directory; instead of checking for .git directory,
in order to support git-worktree, in such case, .git will be a file, see
gitrepository-layout(5)
Makefile