Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting GIT_VERSION #21

Merged
merged 1 commit into from
Jan 19, 2017
Merged

Conversation

orbea
Copy link
Contributor

@orbea orbea commented Jan 19, 2017

When making slackbuilds for libretro cores I have to package the source code myself as cloning with git during the build process is not accepted as slackbuilds.org. During this process I remove the .git directory from the source directory as its not needed and can be very large for some cores (mame). However many libretro cores set GIT_VERSION which adds a useful git hash in the RetroArch menu next to the version, but without the git directory the following error will be printed.

fatal: Not a git repository (or any parent up to mount point /tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

This can be easily avoided by using ?= instead of := in the makefile and then adding the following to my slackbuilds which have the git hash already provided in the version.

VERSION=2017.01.18_04df835

make GIT_VERSION=$(echo $VERSION | cut -d '_' -f 2)

Of course if GIT_VERSION is not set then the default behavior will still be used. If this is acceptable for libretro I will submit more PRs for other cores with time.

@inactive123 inactive123 merged commit 5415b1b into libretro:master Jan 19, 2017
@orbea orbea deleted the git_version branch January 19, 2017 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants