チケット #43879

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

登録: 2022-02-16 23:03 最終更新: 2022-02-19 19:25

報告者:
担当者:
チケットの種類:
状況:
完了
コンポーネント:
マイルストーン:
優先度:
5 - 中
重要度:
5 - 中
解決法:
修正済み
ファイル:
2

詳細

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)

チケットの履歴 (6 件中 3 件表示)

2022-02-16 23:03 更新者: cazfi
  • 新しいチケット "generate_gitrev.sh: Relative path to output file does not work" が作成されました
2022-02-16 23:34 更新者: cazfi
コメント

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 更新者: cazfi
  • 担当者(未割り当て) から cazfi に更新されました
  • 解決法なし から 受領 に更新されました
2022-02-19 19:25 更新者: cazfi
  • 状況オープン から 完了 に更新されました
  • 解決法受領 から 修正済み に更新されました
コメント

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.

編集

ログインしていません。ログインしていない状態では、コメントに記載者の記録が残りません。 » ログインする