Article View: gnu.utils.bug
Article #418Make can't capture shell output in a variable
From: Stephen Gildea
Date: Tue, 12 Sep 1989 19:32
Date: Tue, 12 Sep 1989 19:32
18 lines
941 bytes
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
Technical Details
Message-ID:
<8909121931.AA08668@life.ai.mit.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!bbn.com!gildeaShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!bbn.com!gildea From: gildea@bbn.com (Stephen Gildea) Newsgroups: gnu.utils.bug Subject: Make can't capture shell output in a variable Message-ID: <8909121931.AA08668@life.ai.mit.edu> Date: 12 Sep 89 19:32:12 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 18