It is currently Thu, 20 Jan 2022 03:33:56 GMT

Author Message
 Command line: How long is too long?

        I am using GNU's autoconf to configure my programs. I
need to configure many subdirectory. Most directory need to take the
-I switch. My problem is my configure script may find some relative
paths for the -I switches. However, I can't just blindly substitute
these relative directories into the sub/dir/etc/ files.

        My solution is I always convert relative pathnames to absolute
paths. The problem with that it I get long lines like this in the

cc -O -I/amd/sunup/i/suwong/dev/bar/bin/sol/bar/include -I/amd/sunup/i/suwong/dev/bar/bin/sol/tcl7.4 -I/amd/sunup/i/suwong/dev/bar/bin/sol/tk4.0  -I/usr/u/suwong/dev/bar/bin/sol/bar/src/xpm-include -I/usr/local/X11R6/include  -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DSTDC_HEADERS=1 -DHAVE_LIBNSL=1 -DNEED_MATHERR=1     -DBAR_LIBRARY=\"/usr/local/lib/bar\" main.o libbar.a  /amd/sunup/i/suwong/dev/bar/bin/sol/lib/libtk.a  /amd/sunup/i/suwong/dev/bar/bin/sol/lib/libtcl.a  -L/usr/local/X11R6/lib  -lX11  -lsocket -l
nsl -lm -o barwish

        This works fine on Solaris. However, I heard that on some
machines I can't have more than X characters in the command line. Is
this really true? If so, how can I get around the problems? I can put
the -D switches in a header file, but I don't really know how to deal
with the -I and -L switches.

        Thanks in advance for any useful information!


 Mon, 04 May 1998 03:00:00 GMT   
 Command line: How long is too long?
In article <48e1fb$>, (Ioi Lam) writes with deletions:

I'm not totally sure if this would work but... how about creating a logical
link directory in your compile directory to /amd/sunup/i/suwong/dev/bar/bin/sol
then just referencing that in your makefile. Or perhaps you could just add the
above path to your path environment variable in your .login

Hope this helps,

Al Priest, Software Engineering, CCI GmbH, Germany. Phone: +49(0)5931 805463
These views are mine, all MINE!! Whoa ha ha. (not CCI's).

 Mon, 04 May 1998 03:00:00 GMT   
   [ 2 post ] 

Similar Threads

1. Linux has a long, long, long way to go

2. Xterm + Bash + Long command lines

3. Entering long command does not wrap line

4. How to find out all the input args of a long command line

5. ps segfaults on long command lines

6. Line splitting long lines

7. On-line/Off-line long-term power backup

8. Ping time gets longer and longer

9. origins of "long long" in C

10. Converting a Wide String to unsigned long long?

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software