autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: $(wildcard *.c) usage


From: Bob Friesenhahn
Subject: Re: $(wildcard *.c) usage
Date: Wed, 16 Jun 2004 15:05:19 -0500 (CDT)

Wildcards are not supported because they either depend on a GNU make feature (not portable) or else they must depend on whatever files the developer happens to have in his directory when automake is executed.

There is also an issue with wildcards in that they cause Makefile rules to be difficult to evaluate for correctness. There may be conflicting rules.

Developers are expected have a good idea of what goes into their package and should be willing to edit Makefile.am to incorporate the files intended to be distributed and built.

Bob

On Wed, 16 Jun 2004, Yasunari Tosa wrote:

I have the following problem and could not find anything in archives using keyword "wildcard".

When I have Makefile.am to have the following:

  lib_LIBRARIES= libutils.a
  libutils_a_SOURCES = $(wildcard *.c)

the resulting Makefile.in (or Makefile) does the following:

  libutils_a_SOURCES = $(wildcard *.c)
  am_libutils_a_OBJECTS =
  libutils_a_OBJECTS = $(am_libutils_a_OBJECTS)

with no .c.o: section included.   This Makefile does not build the library.
Is there any way to make the wild card work?

What I did to work around this, to do

  am_libutils_a_OBJECTS=$(libutils_a_SOURCES:%.c=%.o)

and added the .c.o section.   I wish that there is a better way.

My relevant software versions are: automake (GNU automake) 1.6.3, autoconf (GNU Autoconf) 2.57.

Thank you in advance for your answer.

Tosa

Yasunari Tosa, Ph.D.               Email: address@hidden
NMR Ctr, Mass. General Hospital Building 149, 13th Street
Charlestown, MA 02129
USA



_______________________________________________
Autoconf mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/autoconf


======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]