Class: Mkduino::ConfigureAc

Inherits:
GeneratedFile show all
Defined in:
lib/configure_ac.rb

Instance Attribute Summary collapse

Attributes inherited from GeneratedFile

#backup_directory, #output_directory, #user_updates_file

Instance Method Summary collapse

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', options = {}
  super output_filename, options
  @makefile_am = makefile_am
end

Instance Attribute Details

#makefile_amObject

Returns the value of attribute makefile_am.



24
25
26
# File 'lib/configure_ac.rb', line 24

def makefile_am
  @makefile_am
end

#output_filenameObject

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_acObject



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 "dnl Process this file with autoconf to produce a configure script.\")\nAC_INIT([\#{makefile_am.project_name}], [1.0])\ndnl AC_CONFIG_SRCDIR( [ Makefile.am ] )\nAM_INIT_AUTOMAKE\nAM_CONFIG_HEADER(config.h)\ndnl AM_CONFIG_HEADER(config.h)\ndnl Checks for programs.\nAC_PROG_CC( avr-gcc )\nAC_PROG_CXX( avr-g++ )\nAC_PROG_RANLIB( avr-ranlib )\nAC_PATH_PROG(OBJCOPY, avr-objcopy)\nAC_PATH_PROG(AVRDUDE, avrdude)\n\nAC_ISC_POSIX\n\ndnl Checks for libraries.\n\ndnl Checks for header files.\nAC_HAVE_HEADERS( Arduino.h )\n\ndnl Checks for library functions.\n\ndnl Check for st_blksize in struct stat\n\n\ndnl internationalization macros\nAC_OUTPUT([Makefile])\n\n"
  end
  return

end