Tíquete #43879

generate_gitrev.sh: Relative path to output file does not work

: 2022-02-16 23:03 Última Atualização: 2022-02-19 19:25

Relator:
Dono:
Tipo:
Estado:
Fechado
Componente:
Marcos:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Fixed
Arquivo:
2

Details

generate_gitrev.sh writes output file relative to input (source) directory, not to the directory it was executed from.

This breaks meson builds 'gitrev' option. (gone unnoticed this far because there often is fc_gitrev_gen.h generated by earlier autotools build)

Ticket History (3/6 Histories)

2022-02-16 23:03 Updated by: cazfi
  • New Ticket "generate_gitrev.sh: Relative path to output file does not work" created
2022-02-16 23:34 Updated by: cazfi
Comentário

That the gitrev build with autotools goes through is by luck. It's supposed to generate the fc_gitrev_gen.h to the build dir: '$(top_builddir)/common/fc_gitrev_gen.h' -> '../common/fc_gitrev_gen.h'. With that output file name it actually gets generated to the source directory, and gets used from there.

2022-02-16 23:40 Updated by: cazfi
  • Dono Update from (Nenhum) to cazfi
  • Resolução Update from Nenhum to Accepted
2022-02-19 19:25 Updated by: cazfi
  • Estado Update from Aberto to Fechado
  • Resolução Update from Accepted to Fixed
Comentário

This has been pushed in, and no fc_gitrev_gen.h should get generated to a wrong location any more. Nothing removes the old stale files that may exist from older builds, and which now pose a risk of getting used instead of a freshly generated correct one. People should check their source trees, if different from a build tree, for common/fc_gitrev_gen.h and remove it if it exist. If one does not use separate build dir, but source dir = build dir, then the file's correct location is that common/fc_gitrev_gen.h. This is also why 'git status' won't show the file in the source dir. It's listed in .gitignore for the build dir = source dir case.

Editar

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login