help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU make ignores COMSPEC, SHELL, MAKESHELL; fails to execute long co


From: 001
Subject: Re: GNU make ignores COMSPEC, SHELL, MAKESHELL; fails to execute long command lines
Date: Fri, 3 Jun 2005 10:29:20 +0800

????
"Jim" <cant_jim@hotmail.com> ¦b¶l¥ó
news:405708ad$0$2795$61fed72c@news.rcn.com ¤¤¼¶¼g...
> I'm having trouble getting Gnu make to execute long command lines. Command
> of 104 characters work fine; those with 105 fail.
> I need the long commands to, for example, delete a long list of files.
>
> It appears that make is ignoring the value of COMSPEC, SHELL, and
MAKESHELL.
> If I set these to refer to
> c:\WINDOWS\system32\cmd.exe in both the environment and make file, the
> problem still occurs.
>
> When I run the commands in a console window using
> "cmd /C" long command work find; using "command /C" only the short
commands
> work.
>
> I've found numerous claims in newsgroups that make doesn't care about
> command length but that does not seem to be the case here.
>
> Can anyone suggest a solution or a workaround? Is there a version of GNU
> make out there that does not have this problem?
>
> A test makefile and its output is below; the make version is:
>     GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
>     Built for i386-pc-msdosdjgpp
>     Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
>
> I thank you in advance for your suggestions ( or your sympathy).
>
> Jim Cant
>
> ***** Here's the makefile: *****
>
> DOUBLE_SPACE = '\n\n'
>
> COMSPEC = c:\WINDOWS\system32\cmd.exe
> SHELL = c:\WINDOWS\system32\cmd.exe
> MAKESHELL = c:\WINDOWS\system32\cmd.exe
> export
>
> FILE_LIST_SHORT = This works file03 file04 file06 file07 file08 file09
> file11 file12 file13 file14 file15 file15
> FILE_LEST_LONG  = This FAILS! 2 File03 File04 File06 File07 File08 File09
> File11 File12 File13 File14 File15 File15_
>
> # switch backslash for forward; '\c' interpreted specially
> top :
> @echo COMSPEC = $(subst \,/,$(COMSPEC))
> @echo MAKESHELL= $(subst \,/,$(MAKESHELL))
> @echo SHELL = $(subst \,/,$(SHELL))
>
> @echo $(DOUBLE_SPACE)
>
> -@echo This Works 789 123456789 123456789 123456789 123456789 123456789
> 123456789 123456789 123456789 1234
> -@echo This FAILS! 89 123456789 123456789 123456789 123456789 123456789
> 123456789 123456789 123456789 12345
>
> @echo $(DOUBLE_SPACE)
> -@rm -rv $(FILE_LIST_SHORT)
> -@rm -rv $(FILE_LEST_LONG)
>
> ***** Here's the output: *****
>
> COMSPEC = c:/WINDOWS/system32/cmd.exe
> MAKESHELL= c:/WINDOWS/system32/cmd.exe
> SHELL = c:/WINDOWS/system32/cmd.exe
>
>
>
> This Works 789 123456789 123456789 123456789 123456789 123456789 123456789
> 123456789 123456789 1234
> make.exe: [top] Error 11 (ignored)
>
>
>
> This
> rm: cannot unlink entry "This": The system cannot find the file specified.
> works
> rm: cannot unlink entry "works": The system cannot find the file
specified.
> file03
> rm: cannot unlink entry "file03": The system cannot find the file
specified.
> file04
> rm: cannot unlink entry "file04": The system cannot find the file
specified.
> file06
> rm: cannot unlink entry "file06": The system cannot find the file
specified.
> file07
> rm: cannot unlink entry "file07": The system cannot find the file
specified.
> file08
> rm: cannot unlink entry "file08": The system cannot find the file
specified.
> file09
> rm: cannot unlink entry "file09": The system cannot find the file
specified.
> file11
> rm: cannot unlink entry "file11": The system cannot find the file
specified.
> file12
> rm: cannot unlink entry "file12": The system cannot find the file
specified.
> file13
> rm: cannot unlink entry "file13": The system cannot find the file
specified.
> file14
> rm: cannot unlink entry "file14": The system cannot find the file
specified.
> file15
> rm: cannot unlink entry "file15": The system cannot find the file
specified.
> file15
> rm: cannot unlink entry "file15": The system cannot find the file
specified.
> make.exe: [top] Error 1 (ignored)
> make.exe: [top] Error 11 (ignored)
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]