Class: Mkduino::ConfigureAc

Inherits:
Object
  • Object
show all
Defined in:
lib/mkduino.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(makefile_am) ⇒ ConfigureAc

Returns a new instance of ConfigureAc.



62
63
64
# File 'lib/mkduino.rb', line 62

def initialize makefile_am
  @makefile_am = makefile_am
end

Instance Attribute Details

#makefile_amObject

Returns the value of attribute makefile_am.



61
62
63
# File 'lib/mkduino.rb', line 61

def makefile_am
  @makefile_am
end

Instance Method Details

#write_configure_acObject



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/mkduino.rb', line 65

def write_configure_ac
  ##
  # Output the configure.ac file
  ##
  puts "Writing configure.ac"
  File.open('configure.ac',"w") 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
end