From 988211d3d4c1f3d5cfa6b460210f65ab636763b5 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 9 Apr 2020 15:59:01 +0900 Subject: build: Use gen-lock-obj.sh script when possible. * configure.ac (HAVE_GENERATED_LOCK_OBJ_H): New. * src/Makefile.am: Support HAVE_GENERATED_LOCK_OBJ_H. -- For cross build, when possible (currently for GNU/Linux), generate lock-obj-pub.native.h by the script. GnuPG-bug-id: 4774 Signed-off-by: NIIBE Yutaka --- src/Makefile.am | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 336fe2a..1cd2f05 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -318,6 +318,12 @@ pre_mkheader_cmds = if test -f lock-obj-pub.native.h; \ then rm lock-obj-pub.native.h; fi mkheader_opts = --cross else +if HAVE_GENERATED_LOCK_OBJ_H +# lock-obj-pub.native.h is generated at configure time +pre_mkheader_cmds = : +mkheader_opts = +parts_of_gpg_error_h += ./lock-obj-pub.native.h +else pre_mkheader_cmds = : mkheader_opts = parts_of_gpg_error_h += ./lock-obj-pub.native.h @@ -325,6 +331,7 @@ parts_of_gpg_error_h += ./lock-obj-pub.native.h ./lock-obj-pub.native.h: Makefile gen-posix-lock-obj$(EXEEXT) posix-lock-obj.h ./gen-posix-lock-obj >$@ endif +endif # We also depend on versioninfo.rc because that is build by # config.status and thus has up-to-date version numbers. -- cgit v1.2.3