Using make file: No rule to make target 'upload'

I have follow the instructions found in the comments of “Arduino.mk”, which agrees mostly with what is on the Emacs wiki page concerning using Emacs as a Arduino IDE.

I have set my environment variables for the following paths in .bashrc and I can confirm these variables in the console:

export ARDUINO_DIR="/usr/share/arduino"
export ARDMK_DIR="/usr/share/arduino"
export AVR_TOOLS_DIR="/usr"

my make file it written as such:

BOARD_TAG = uno
MONITOR_PORT = /dev/ttyUSB0
USER_LIB_PATH := $(realpath <MyHomeDirectory>/sketchbook/libraries)

include /usr/share/arduino/Arduino.mk

My project directory is not in sketchbook, but in a project directory in another location. That location contains my make file and my . ino file. From that location I am running the following make command

make -k upload

When I do this, I get the following error:

make -k upload
make: *** No rule to make target 'upload'.  Stop.

I can compile and upload the sketch from the Arduino IDE, no problems. I am running Kubuntu 18.04.1

What am I missing here?

Never mind, I got it…

The problem was with my make call. I need to either specify my make file name in my make call, or call my make file “makefile”. I had called it “make”.

Hope this helps other lost souls…

Glad you figured it out.

The powers that be suggest changing the subject to add [Solved] for efficiency. :)