Class: Mkduino::ConfigureAc
- Inherits:
-
GeneratedFile
- Object
- GeneratedFile
- Mkduino::ConfigureAc
- Defined in:
- lib/configure_ac.rb
Instance Attribute Summary collapse
-
#makefile_am ⇒ Object
Returns the value of attribute makefile_am.
-
#output_filename ⇒ Object
Returns the value of attribute output_filename.
Attributes inherited from GeneratedFile
#backup_directory, #output_directory, #user_updates_file
Instance Method Summary collapse
-
#initialize(makefile_am, output_filename = 'configure.ac', options = {}) ⇒ ConfigureAc
constructor
A new instance of ConfigureAc.
- #write_configure_ac ⇒ Object
Methods inherited from GeneratedFile
#apply_user_updates, #save_file, #save_user_updates, #write_file
Constructor Details
#initialize(makefile_am, output_filename = 'configure.ac', options = {}) ⇒ ConfigureAc
Returns a new instance of ConfigureAc.
25 26 27 28 |
# File 'lib/configure_ac.rb', line 25 def initialize makefile_am, output_filename = 'configure.ac', = {} super output_filename, @makefile_am = makefile_am end |
Instance Attribute Details
#makefile_am ⇒ Object
Returns the value of attribute makefile_am.
24 25 26 |
# File 'lib/configure_ac.rb', line 24 def makefile_am @makefile_am end |
#output_filename ⇒ Object
Returns the value of attribute output_filename.
24 25 26 |
# File 'lib/configure_ac.rb', line 24 def output_filename @output_filename end |
Instance Method Details
#write_configure_ac ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/configure_ac.rb', line 30 def write_configure_ac write_file do |f| f.puts <<-CONFIGURE_AC dnl Process this file with autoconf to produce a configure script.") AC_INIT([#{makefile_am.project_name}], [1.0]) dnl AC_CONFIG_SRCDIR( [ Makefile.am ] ) AM_INIT_AUTOMAKE AM_CONFIG_HEADER(config.h) dnl AM_CONFIG_HEADER(config.h) dnl Checks for programs. AC_PROG_CC( avr-gcc ) AC_PROG_CXX( avr-g++ ) AC_PROG_RANLIB( avr-ranlib ) AC_PATH_PROG(OBJCOPY, avr-objcopy) AC_PATH_PROG(AVRDUDE, avrdude) AC_ISC_POSIX dnl Checks for libraries. dnl Checks for header files. AC_HAVE_HEADERS( Arduino.h ) dnl Checks for library functions. dnl Check for st_blksize in struct stat dnl internationalization macros AC_OUTPUT([Makefile]) CONFIGURE_AC end return end |