Open xandrd opened 3 years ago
Hi! Thanks for raising this issue. Maybe we should replace the -d
check with a -e
check, which would also match a file. I'm wondering how portable this is on non-unix environments though. If someone has an idea on how to do this portably it would be a good idea.
Also, while correcting this, we should have sensible defaults if the library is not compiled from a git repository.
I agree. We had some problems compiling the library on MAC, which we solved by manually introducing files fortran_version.inc
, fortran_release.inc
, ntime_max.inc
. Sometimes, make does not create them due to the incompatible environment.
Perhaps, the pre-compiled libraries (e.g., windows dlls) can be added as [github relase].(https://docs.github.com/en/github/administering-a-repository/releasing-projects-on-github/about-releases).
@AntoineBrunet, I have not looked into this issue, but can we remove the git parts from the Makefile
? I propose this solution because it also breaks the Windows 10 build when I use PowerShell or Command Prompt. As a workaround, I have to use a 3rd party bash on Windows to get it to compile.
Is it possible to create fortran_release.inc via github actions? In this case the file will be always available in the repository and the Makefile does not have to create it using git.
@AntoineBrunet BTW, thank you for introducing if [ -e .git ]
. I can confirm that the issue with submodules is resolved.
However, as @mshumko mentioned before, if would be great if we can find a different solution that does not involve bash or git in the Makefile.
https://github.com/PRBEM/IRBEM/blob/a4759c0ea30159d4134d3616316bf90d299a03b8/Makefile#L48
When IRBEM library is created as a submodule,
.git
is a file, not a directory. Hence, make fails to get the variable GIT_RELEASE and GIT_REV correctly. The workaround is to change.git
to.github
.Quick steps to reproduce: