diff options
author | Joseph Sutton <josephsutton@catalyst.net.nz> | 2022-02-21 19:12:28 +1300 |
---|---|---|
committer | Joseph Sutton <jsutton@samba.org> | 2022-03-01 22:34:35 +0000 |
commit | 7cb68fdba75c362cdfd8f3bf08bcd9c22bbe4556 (patch) | |
tree | 0c4f9c24a6de64391711b6e00719cbee4f707c9a /third_party | |
parent | 675f913e54d8fddb9173c1e67b9d14885cc1d878 (diff) | |
download | samba-7cb68fdba75c362cdfd8f3bf08bcd9c22bbe4556.tar.gz |
third_party/heimdal_build: Don't generate .x source files
This is an adaptation to Heimdal:
commit 9427796f1a65906f12768b28abdb5a928222f3c6
Author: Jeffrey Altman <jaltman@secure-endpoints.com>
Date: Wed Jan 5 15:45:23 2022 -0500
Generate .x source files as .c source files
The generated .x source and .hx header files are plain C source files.
Generate them as .c source files and avoid unnecessary file copying
and special makefile rules.
Change-Id: Ifc4bbe3c46dd357fdd642040ad964c7cfe1d395c
NOTE: THIS COMMIT WON'T COMPILE/WORK ON ITS OWN!
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14995
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/heimdal_build/wscript_build | 47 |
1 files changed, 8 insertions, 39 deletions
diff --git a/third_party/heimdal_build/wscript_build b/third_party/heimdal_build/wscript_build index 69aeb120191..3ea1fc93653 100644 --- a/third_party/heimdal_build/wscript_build +++ b/third_party/heimdal_build/wscript_build @@ -40,10 +40,10 @@ def HEIMDAL_ASN1(name, source, bld.set_group('build_source') out_files = heimdal_paths([ - "%s/asn1_%s_asn1.x" % (directory, bname), - "%s/%s_asn1.hx" % (directory, bname), - "%s/%s_asn1-priv.hx" % (directory, bname), - "%s/%s_asn1_oids.x" % (directory, bname), + "%s/asn1_%s_asn1.c" % (directory, bname), + "%s/%s_asn1.h" % (directory, bname), + "%s/%s_asn1-priv.h" % (directory, bname), + "%s/%s_asn1_oids.c" % (directory, bname), ]) # the ${TGT[0].parent.abspath(env)} expression gives us the parent directory of @@ -81,7 +81,7 @@ def HEIMDAL_ASN1(name, source, deps = 'asn1_compile' t = bld(rule=asn1_rule, - ext_out = '.x', + ext_out = '.c', before = 'c', update_outputs = True, shell = True, @@ -97,40 +97,9 @@ def HEIMDAL_ASN1(name, source, t.env.OPTION_FILE = "--option-file='%s'" % \ os.path.normpath(os.path.join(bld.path.abspath(), option_file)) - cfile = out_files[0][0:-2] + '.c' - hfile = out_files[1][0:-3] + '.h' - hpriv = out_files[2][0:-3] + '.h' - - # now generate a .c file from the .x file - t = bld(rule='''( echo '#include "config.h"' && cat ${SRC} ) > ${TGT}''', - source = out_files[0], - target = cfile, - shell = True, - update_outputs=True, - ext_out = '.c', - ext_in = '.x', - depends_on = name + '_ASN1', - name = name + '_C') - - # and generate a .h file from the .hx file - t = bld(rule='cp ${SRC} ${TGT}', - source = out_files[1], - ext_out = '.c', - ext_in = '.x', - update_outputs=True, - target = hfile, - depends_on = name + '_ASN1', - name = name + '_H') - - # and generate a .h file from the .hx file - t = bld(rule='cp ${SRC} ${TGT}', - source = out_files[2], - ext_out = '.c', - ext_in = '.x', - update_outputs=True, - target = hpriv, - depends_on = name + '_ASN1', - name = name + '_PRIV_H') + cfile = out_files[0] + hfile = out_files[1] + hpriv = out_files[2] bld.set_group('main') |