Path: utzoo!utgpu!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!cs.utexas.edu!sm.unisys.com!csun!csuna!acphssrw From: acphssrw@csuna.UUCP (Stephen R. Walton) Newsgroups: comp.sys.amiga.tech Subject: Re: Makefiles and rebooting Summary: Can't use command line redirection from an Amiga Makefile Message-ID: <1309@csuna.UUCP> Date: 3 Aug 88 21:33:23 GMT References: <25414@ucbvax.BERKELEY.EDU> Reply-To: bcphssrw@csunb.csun.edu (Stephen R. Walton) Organization: California State University, Northridge Lines: 33 In article <25414@ucbvax.BERKELEY.EDU> rbrown@ernie.Berkeley.EDU.UUCP (Robert Brown) writes: >Hi! I'm trying to port JOVE to my Amiga. But I had a weird problem with >the Makefile. This line: > > @sed -e 's;TMPDIR;$(TMPDIR);' \ > -e 's;LIBDIR;$(LIBDIR);' \ > -e 's;BINDIR;$(BINDIR);' \ > -e 's;SHELL;$(SHELL);' tune.template >> tune.c Robert then mentions he's using Manx make. I don't know why it Guru's, but the above Makefile line won't work as it does under Un*x. The reason is that Manx's make executes sed directly via the fexecv() function, but the code to do command line redirection (like the >> above) is in the CLI. Un*x gets around this by using the system() call, which actually calls up a new shell which executes the line from the Makefile as if it had been typed by the user. I've been thinking about a system() call for the Amiga which would do something similar to the Unix version based on the environment variable SHELL (set to "csh -c " for the Dillon/Drew shell, "newwsh CMD" for WShell, etc.). To do this requires support from the shells, though. In particular, the shell must exit with exit status equal to the exit status of the command which was passed to it. Version 2.7M of csh doesn't do this with its internal commands: if you do a "csh -c cp file1 file2" and file1 doesn't exist, csh does not exit with an error. How does this look to people? Stephen Walton, representing myself swalton@solar.stanford.edu Cal State, Northridge rckg01m@calstate.BITNET