🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Stephen Gildea Tue, 12 Sep 1989 19:32
Make can't capture shell output in a variable
#418
Author: Stephen Gildea
Date: Tue, 12 Sep 1989 19:32
18 lines
941 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads