gildea@bbn.com (Stephen Gildea) (09/13/89)
In Make 3.55, I can't find a feature similar to the shell backquote: the ability to set a Make variable to the output of a shell command. SunOS 4.0 Make has the feature I want. You can set a variable with :sh= instead of = and it will take the value to be a shell command. For a sample use, consider this piece of a Makefile. /bin/arch is a program that prints what you're running on: "sun3", "sun4", etc. ARCH:sh=/bin/arch LIBDIR=lib/$(ARCH) myprog: $(OBJS) $(CC) $(CFLAGS) -o $@ $(OBJS) -L$(LIBDIR) $(LIBS) < Stephen
mcgrath%paris.Berkeley.EDU@GINGER.BERKELEY.EDU (Roland McGrath) (09/15/89)
You didn't read the manual. There is a `shell' function: ARCH := $(shell /bin/arch)