unix commands in makefiles

Jim Klavetter jjk at astro.UMD.EDU
Sat Feb 17 06:57:00 AEST 1990


Running under sunos 4.0.3, I have the following in my makefile:

__________________________________________________________________
DEST          = $(HOME)/astrobin/`arch`
...
install:        $(PROGRAM)
	@echo Installing $(PROGRAM) in $(DEST)
	@install -s -g wheel $(PROGRAM) $(DEST)
__________________________________________________________________

And this works as expected when I type "make install":  I get my
program installed in /a/jjk/astrobin/sun3 (if on a sun3).  Note that
this works if the program is made and I only want to install.

However, with the following fragment in place:

__________________________________________________________________
LIBS          = $(HOME)/astro/astro.a \
                $(HOME)/util/util.a \
                $(HOME)/iraf/lib/`arch`/iraf.a \
                /iraf/local/bin.$(FLOAT_OPTION)/libimfort.a \
                /iraf/local/bin.$(FLOAT_OPTION)/libsys.a \
                /iraf/local/bin.$(FLOAT_OPTION)/libvops.a \
                /iraf/local/unix/bin.mc68020/libos.a \
                /usr/lib/libF77.a /usr/lib/libI77.a \
                /usr/lib/libm.a
...
__________________________________________________________________

I get the following error message when I try to make my program:

make: Fatal error: Don't know how to make target `/a/jjk/iraf/lib/`arch`/iraf.a'

Obviously, the `arch` works as expected in the DEST definition, but is
not getting read properly in the LIBS definition.  Can someone please
help me with this?

Thanks

Jim Klavetter
jjk at astro.umd.edu
Astronomy Program
University of Maryland
College Park, MD  20742



More information about the Comp.unix.questions mailing list