This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Neil,
>Date: Fri, 18 Apr 2003 16:46:12 -0500
>From: Texas A+M LDM <address@hidden>
>Organization: Texas A&M University
>To: address@hidden
>Subject: make and gmake on freebsd
The above message contained the following:
> Seems I recall your earlier builds of ldm 6.x.x on FreeBSD required using 
> gmake instead of make, while the 6.0.10 works with make on FreeBSD.
> In that some of us trying to port weather to FreeBSD are seeing make fail on 
> Peter Nielly's Makefile:
> "Makefile", line 317: Missing dependency operator
> "Makefile", line 321: Missing dependency operator
> "Makefile", line 325: Missing dependency operator
> make: fatal errors encountered -- cannot continue
> 
> while gmake doesn't have that problem with the Makfile, I was wondering what 
> it was with 'make'ing on freebsd that you found and then solved?
The FreeBSD make(1) utility had problems with the implicit ".c.a" rule:
it didn't compile the C files and put the object modules in the library.
The solution was to avoid using that rule and, instead, explicitly
require compilation of the C files into object modules and then the
adding of those object modules to the library. This meant rewriting the
makefiles to avoid the use of the "library(module.o)" syntax.  For
example:
    LIB_OBJS = $(LIBRARY)(module1.o) $(LIBRARY)(module2.o) ...
    all: $(LIB_OBJS)
became, instead
    LIB_OBJS = module1.o module2.o ...
    all: $(LIB_OBJS)
            $(AR) -ru $(LIBRARY) $(LIB_OBJS)
Good luck.
> Thanks, -Neil
Regards,
Steve Emmerson