I am trying to keep automake happy in order to prevent the following kind of warnings:
EmptyFirmware/Makefile.am:41: warning: source file '$(CMSIS_SRC_TEMPLATE_DIR)/system_sam3x.c' is in a subdirectory,
EmptyFirmware/Makefile.am:41: but option 'subdir-objects' is disabled
After all, as far as I am concerned, automake can create as many subdirectories as it wants in the build directory. However, when I add option "subdir-objects", automate generates subdirectories like this when compiling:
drwxrwxr-x 3 rdiez rdiez 4,096 Oct 6 20:53 $(BARE_METAL_SUPPORT_DIR)
-rw-rw-r-- 1 rdiez rdiez 30,584 Oct 6 20:53 Makefile
Note that the directory name contains a GNU Make variable that has not been
substituted. Later on, linking fails because it does substitute properly when looking for the file. For example:
Makefile:424: /home/rdiez/rdiez/arduino/asf-standalone-archive-188.8.131.52/sam/utils/cmsis/sam3x/source/templates/.deps/libcmsis_a-system_sam3x.Po: No such file or directory
I looked further around the in build directory, and I found more directories like that:
Note that the $(ASF_BASEDIR) etc. variables have not been expanded either when creating those directories. Those variables do work well all over the place, as I am using "AC_SUBST(ASF_BASEDIR)" and so on in the top-level configure.ac file. I guess autoconf or automake are not dealing correctly with those absolute paths outside the project directory when they contain variables.
I am using Ubuntu 14.04, which comes with autoconf 2.69 and automake 1.14.1. I am building out of the source tree.
I could try with VPATH, but then there will be ambiguities if 2 files are called the same but live in different subdirectories in the source tree.
The Atmel Software Framework (ASF) is a C source code library that, as far as I know, does not provide an autotool building environment. My project does use the autotools. Some C++ source files are in my project's directories, but some files live in the ASF directory, which can be anywhere on the system (user configurable, normally an absolute path).
I thought I could just reference those ASF .c files from my autotools project, but with the latest versions I am getting warnings like the ones above. This is how I am referencing the files:
Think, for example, of sources being in a read-only mount (like a CD-ROM).
Other files do live in my project directory, but are special and get referenced directly from the main makefile:
# See the comments in the Bare Metal Support library's Makefile.am
# for information about why these files are compiled here.
emptydue_elf_SOURCES += $(BARE_METAL_SUPPORT_DIR)/NewlibSyscalls.cpp
emptydue_elf_SOURCES += $(BARE_METAL_SUPPORT_DIR)/crt0.cpp
Is this a bug in automake? Or is there a way to keep Automake happy?
Please copy me on any answers, as I am not subscribed to this list.