0

I have a autoconf/automake system that has a stand-alone target called stand. I don't want stand to be normally built, so I have this in my Makefile.am:

bin_PROGRAMS = grace
extra_PROGRAMS = stand
...
stand_SOURCES = stand.cpp barry.cpp ...

This has worked for a while, but automake just got updated on my system and I'm now getting this error:

src/Makefile.am:4: error: 'extra_PROGRAMS' is used but 'extradir' is undefined
src/Makefile.am:66: warning: variable 'stand_SOURCES' is defined but no program or
src/Makefile.am:66: library has 'stand' as canonical name (possible typo)

So I added this:

extradir = .

But that has caused problems.

I don't want the stand program installed. It's just a test program for me. But it's not part of a formal test suite, it's just for my own purposes. What should I do?

vy32
  • 28,461
  • 37
  • 122
  • 246

2 Answers2

3

We found the bug! It turns out that extra needs to be capitalized, like this:

bin_PROGRAMS = grace
EXTRA_PROGRAMS = stand
...
stand_SOURCES = stand.cpp barry.cpp ...
vy32
  • 28,461
  • 37
  • 122
  • 246
  • I did the same thing as you did. But I'm still getting the same error: error: 'SHELLTESTS_PROGRAMS' is used but 'SHELLTESTSdir' is undefined. Here is a question I posted: [Check framework integration on project failed to build](http://stackoverflow.com/questions/29718158/check-framework-integration-on-project-failed-to-build) – macmania314 Apr 20 '15 at 04:14
1

You could try conditionally building it:

noinst_PROGRAMS=
if BUILD_STAND
noinst_PROGRAMS += stand
endif
stand_SOURCES = stand.cpp barry.cpp ...

This will not install it since it's in noinst_PROGRAMS and others will normally not build it since BUILD_STAND will normally not be defined for them.

ldav1s
  • 15,885
  • 2
  • 53
  • 56