Bug#734875: arduino-mk: incorrect ARDMK_DIR results in error "ARDUINO_DIR is not defined"
Antonio Ospite
ospite at studenti.unina.it
Fri Jan 10 15:14:14 UTC 2014
Package: arduino-mk
Version: 1.1.0-1
Severity: important
Dear Maintainer,
in previous arduino-mk releases I was able to user very small Makefiles
like the one below:
--------------------------------------------------------
BOARD_TAG = uno
MONITOR_PORT = /dev/ttyACM0
include /usr/share/arduino/Arduino.mk
--------------------------------------------------------
with 1.1.0 this does not work anymore and on each make invocation I get
this error:
/usr/share/arduino/Arduino.mk:279: *** "ARDUINO_DIR is not defined". Stop.
I tracked down the cause by using "make -p", it looks like ARDUINO_DIR
can be populated by calling $(call dir_if_exists,/usr/share/arduino),
but dir_if_exists (defined in Common.mk) is not available; this is
because Common.mk is not included, it should be included from somewhere
under $(ARDMK_DIR), but $(ARDMK_DIR) is equal to /usr/share and not
/usr/share/arduino like I would expect.
So two solutions are possible:
1. Fix the computation of ARDMK_DIR like this:
--- Arduino.mk.orig 2014-01-10 15:55:09.591688000 +0100
+++ Arduino.mk 2014-01-10 15:55:15.991688000 +0100
@@ -232,7 +232,7 @@ endif
ifndef ARDMK_DIR
# presume it's a level above the path to our own file
- ARDMK_DIR := $(realpath $(dir $(realpath $(lastword $(MAKEFILE_LIST))))/..)
+ ARDMK_DIR := $(realpath $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
else
# show_config_variable macro is defined in Common.mk file and is not available yet.
# Let's define a variable to know that user specified ARDMK_DIR
2. install the files under /usr/share/arduino/arduino-mk, this way the
ARDMK_DIR calculation is still correct and the files do not need to
be patched.
Maybe you want to ask upstream about the best approach? I like 2 better.
A workaround to make the package useful again is to define ARDMK_DIR by
hand in the Makefile before the include line:
ARDMK_DIR = /usr/share/arduino/
BTW there is something fishy about ARDMK_PATH too, the doc says:
=> ARDMK_DIR - Where the *.mk files are stored
=> ARDMK_PATH - Where the ard-reset-arduino script is stored
but then suggests this for linux:
ARDMK_DIR = /usr
because ARDMK_PATH is ARDMK_DIR/bin, but this contradicts the statement
that ARDMK_DIR is where the *.mk files are.
But this is more an upstream problem.
Thanks,
Antonio
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (900, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.13.0-rc6-ao2 (SMP w/1 CPU core)
Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages arduino-mk depends on:
ii arduino-core 1:1.0.5+dfsg2-1
ii libconfig-yaml-perl 1.42-2
ii libdevice-serialport-perl 1.04-2+b4
ii perl 5.18.1-5
Versions of packages arduino-mk recommends:
ii perl-doc 5.18.1-5
arduino-mk suggests no packages.
-- no debconf information
--
Antonio Ospite
http://ao2.it
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
More information about the debian-science-maintainers
mailing list