diff options
author | Daiki Ueno <dueno@redhat.com> | 2018-01-31 10:27:43 +0100 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2018-01-31 15:51:28 +0100 |
commit | 3a88f2ed573a5bb04d2397c626f6bcf3b1a814da (patch) | |
tree | 70afbb882307a7cf447bff109e5b48a31cfe9cec /p11-kit/Makefile.am | |
parent | 57697eda68a3343c2e54e5f8f3f4ce65a99383f5 (diff) |
build: Split out generated code from p11-kit/virtual.c
Diffstat (limited to 'p11-kit/Makefile.am')
-rw-r--r-- | p11-kit/Makefile.am | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/p11-kit/Makefile.am b/p11-kit/Makefile.am index 303fe06..243ee54 100644 --- a/p11-kit/Makefile.am +++ b/p11-kit/Makefile.am @@ -28,6 +28,40 @@ COMMON_SRCS = \ p11-kit/virtual-fixed.h \ $(inc_HEADERS) +BUILT_SOURCES += \ + p11-kit/virtual-fixed.c \ + $(NULL) + +CLEANFILES += \ + p11-kit/virtual-fixed.c \ + $(NULL) + +p11-kit/virtual-fixed.c: Makefile + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + echo; \ + counter=0; \ + while test $$counter -lt $(closures); do \ + echo "P11_VIRTUAL_FIXED_FUNCTIONS($$counter)"; \ + counter=`expr $$counter + 1`; \ + done; \ + echo; \ + echo "CK_FUNCTION_LIST p11_virtual_fixed[P11_VIRTUAL_MAX_FIXED] = {"; \ + counter=0; \ + while test $$counter -lt $(closures); do \ + echo " P11_VIRTUAL_FIXED_INITIALIZER($$counter),"; \ + counter=`expr $$counter + 1`; \ + done; \ + echo '};'; \ + echo; \ + counter=0; \ + while test $$counter -lt $(closures); do \ + echo "P11_VIRTUAL_FIXED_GET_FUNCTION_LIST($$counter)"; \ + counter=`expr $$counter + 1`; \ + done; \ + } > $@-t && \ + mv -f $@-t $@ + lib_LTLIBRARIES += \ libp11-kit.la |