- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: GNV: make hitting command line maximum length
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 05:51 AM
тАО07-27-2009 05:51 AM
Re: GNV: make hitting command line maximum length
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 08:25 AM
тАО07-27-2009 08:25 AM
Re: GNV: make hitting command line maximum length
SHELL = /gnu/bin/bash
MYFILES = file01.txt file02.txt file03.txt file04.txt file05.txt \
file06.txt file07.txt file08.txt file09.txt file10.txt \
file11.txt file12.txt file13.txt file14.txt file15.txt \
file16.txt file17.txt file18.txt file19.txt file20.txt \
file21.txt file22.txt file23.txt file24.txt file25.txt
.PHONY: test1 test2
test1:
touch $(MYFILES)
test2:
DCL show time
I had the SHELL line in my example before, but I didn't think it was relevant. Turns out it is. In this makefile, test1 fails and test2 works. If you take out the SHELL line, test1 works and test2 fails, returning an error that stops make from proceeding:
bash$ make -f support4.mak test2
DCL show time
27-JUL-2009 12:21:04
/gnu/bin/make: *** [test2] Error 1
bash$
I had no idea that my fix for test2 actually caused of the problem with test1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 08:38 AM
тАО07-27-2009 08:38 AM
Re: GNV: make hitting command line maximum length
bash$ ls hello.c
hello.c
bash$ echo $?
0
bash$ dcl show time
27-JUL-2009 12:35:31
bash$ echo $?
1
bash$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 08:44 AM
тАО07-27-2009 08:44 AM
Re: GNV: make hitting command line maximum length
You'll want to look at the update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 09:35 AM
тАО07-27-2009 09:35 AM
Re: GNV: make hitting command line maximum length
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2009 10:02 AM
тАО07-27-2009 10:02 AM
Re: GNV: make hitting command line maximum length
If you're using gnv, you're going to want to rummage around for (newer) pieces. What's in gnv is often a little stale, and there can be updates and fixes around. John Malmberg posted various updates to gnv over at the Eisner host, for instance. Though the gnv bits have moved (and there are references at the following), start reading here:
http://eisner.encompasserve.org/~malmberg/GNV/
There's been an associated and running discussion about gnv and about other open source on OpenVMS in general, too. (It'd be nice to see the latest gnv bits available out at sourceforge, for instance.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2009 02:38 AM
тАО07-28-2009 02:38 AM
SolutionUsing GNV make from bash ...
If you have the SHELL specified, your action line for test2 really is $(SHELL) -c 'dcl show time'. So you get the 0 returned from shell and make sees success.
The same applies to your action line for test1, now you have $(SHELL) -c 'touch file01.txt file02.txt file03.txt file04.txt file05.txt ...'
That fails in my environment with
make: execv 2: /gnu/bin/bash: no such file or directory
make: execv 2: -c: no such file or directory
make: execv 2: touch file01.txt file02.txt file03.txt
At the moment I can't explain the behavior of GNV make, here.
It looks like you need the SHELL only to work around the bug in the dcl utility. So you may want to use /gnu/bin/bash -c 'show time' for such actions. (However, fixing the bug in the dcl utility seems easier :-)
Using GNU make 3.81 ...
GNU make for VMS will not use the specified SHELL. In my environment it works for test1 And if you remove the dcl in the other action line, it works for test2, too. Both from bash and (the real) DCL.
I do have zipped GNU make 3.81, built on V8.3 on Integrity, about 400 disk blocks. Let me know where to copy it or if you want me to attach it, here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2009 05:38 AM
тАО07-28-2009 05:38 AM
Re: GNV: make hitting command line maximum length
DON'T define makefile SHELL variable. Even if correctly defined, this will severely limit the maximum command line length.
DO define an alias for make with the full path (i.e. alias make=/gnu/bin/make). Otherwise make can't properly re-execute itself when needed.
DCL commands don't return zero on success. Therefore, if you use them in a makefile, either instruct make to ignore the return value with "-" or invoke something after the DCL command that will return a zero on success, like:
DCL DIR /FULL | grep MAKEFILE
or
DCL DIR MYFILE.TXT ; dcl_return $?
where dcl_return is:
#!/gnu/bin/bash
# Converts DCL return value into bash return code
# In DCL, odd value means success. In bash, 0 value means success.
# If DCL failure (even), return the DCL return value.
if [ $(( $1 & 1 )) -eq "1" ]
then
exit 0
else
exit $1
fi
- « Previous
-
- 1
- 2
- Next »