tech-toolchain archive

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

Re: make: ensure ${.MAKE} works



In article <27514.1271200682%bad.crufty.net@localhost>,
Simon J. Gerraty <sjg%crufty.net@localhost> wrote:

>If that were guaranteed to be correct, I imagine realpath() would have
>succeeded.   I'd opt to use the result of realpath() if it worked, or
>just punt and stick with argv[0]:
>
>       if (argv[0][0] == '/') {
>           p1 = argv[0];
>       } else {
>           p1 = realpath(argv[0], mdpath);
>           if (!p1 || *p1 != '/') {
>               p1 = argv[0];           /* realpath failed */
>           }
>       }

That looks great.

christos



Home | Main Index | Thread Index | Old Index