Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

renamed autogenerated files from *.c to *.inc to avoid problems with …

…extconf.rb

add tmp to CLEAN list
  • Loading branch information...
commit 7f3cf8cdedf4904304417075f1f4c9a3b2e82755 1 parent 2ba4a12
@larskanis authored
Showing with 15 additions and 12 deletions.
  1. +12 −9 Rakefile
  2. +2 −2 ext/pk11.c
  3. +1 −1  ext/pk11_const.c
View
21 Rakefile
@@ -5,9 +5,11 @@ require 'rubygems'
require 'hoe'
require 'rake/extensiontask'
-CLEAN.include 'ext/pk11_struct_def.c'
-CLEAN.include 'ext/pk11_struct_impl.c'
+CLEAN.include 'ext/pk11_struct_def.inc'
+CLEAN.include 'ext/pk11_struct_impl.inc'
+CLEAN.include 'ext/pk11_const_def.inc'
CLEAN.include 'lib/pkcs11_ext.so'
+CLEAN.include 'tmp'
hoe = Hoe.spec 'pkcs11' do
developer('Ryosuke Kutsuna', 'ryosuke@deer-n-horse.jp')
@@ -22,8 +24,8 @@ hoe = Hoe.spec 'pkcs11' do
self.extra_rdoc_files << self.readme_file << 'ext/pk11.c'
spec_extras[:extensions] = 'ext/extconf.rb'
spec_extras[:files] = File.read_utf("Manifest.txt").split(/\r?\n\r?/)
- spec_extras[:files] << 'ext/pk11_struct_impl.c'
- spec_extras[:files] << 'ext/pk11_struct_def.c'
+ spec_extras[:files] << 'ext/pk11_struct_impl.inc'
+ spec_extras[:files] << 'ext/pk11_struct_def.inc'
end
ENV['RUBY_CC_VERSION'] = '1.8.6:1.9.1'
@@ -34,12 +36,13 @@ Rake::ExtensionTask.new('pkcs11_ext', hoe.spec) do |ext|
ext.cross_platform = ['i386-mswin32', 'i386-mingw32'] # forces the Windows platform instead of the default one
end
-file 'ext/pk11_struct_def.c' => 'ext/generate_structs.rb' do
- sh "ruby ext/generate_structs.rb --def ext/pk11_struct_def.c --impl ext/pk11_struct_impl.c --const ext/pk11_const_def.c ext/include/pkcs11t.h"
+file 'ext/extconf.rb' => 'ext/pk11_struct_def.inc'
+file 'ext/pk11_struct_def.inc' => 'ext/generate_structs.rb' do
+ sh "ruby ext/generate_structs.rb --def ext/pk11_struct_def.inc --impl ext/pk11_struct_impl.inc --const ext/pk11_const_def.inc ext/include/pkcs11t.h"
end
-file 'ext/pk11_struct_impl.c' => 'ext/pk11_struct_def.c'
-file 'ext/pk11.c' => 'ext/pk11_struct_def.c'
-file 'ext/pk11_const.c' => 'ext/pk11_struct_def.c'
+file 'ext/pk11_struct_impl.inc' => 'ext/pk11_struct_def.inc'
+file 'ext/pk11.c' => 'ext/pk11_struct_def.inc'
+file 'ext/pk11_const.c' => 'ext/pk11_struct_def.inc'
# RDoc-upload task for github (currently on rubyforge)
#
View
4 ext/pk11.c
@@ -1659,7 +1659,7 @@ PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SESSION_INFO, state);
PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SESSION_INFO, flags);
PKCS11_IMPLEMENT_ULONG_ACCESSOR(CK_SESSION_INFO, ulDeviceError);
-#include "pk11_struct_impl.c"
+#include "pk11_struct_impl.inc"
///////////////////////////////////////
@@ -1898,7 +1898,7 @@ Init_pkcs11_ext()
PKCS11_DEFINE_MEMBER(CK_MECHANISM, mechanism);
PKCS11_DEFINE_MEMBER(CK_MECHANISM, pParameter);
- #include "pk11_struct_def.c"
+ #include "pk11_struct_def.inc"
//CK_AES_CTR_PARAMS
//CK_ARIA_CBC_ENCRYPT_DATA_PARAMS
View
2  ext/pk11_const.c
@@ -199,7 +199,7 @@ Init_pkcs11_const(VALUE cPKCS11, VALUE ePKCS11Error)
vMECHANISMS = rb_hash_new();
vRETURN_VALUES = rb_hash_new();
- #include "pk11_const_def.c"
+ #include "pk11_const_def.inc"
rb_obj_freeze(vOBJECT_CLASSES);
rb_define_const(cPKCS11, "OBJECT_CLASSES", vOBJECT_CLASSES);
Please sign in to comment.
Something went wrong with that request. Please try again.