61 |
FILE* fp = HAVE_OPT( DRY_RUN ) ? stdout : popen( pz_shell, "w" ); |
FILE* fp = HAVE_OPT( DRY_RUN ) ? stdout : popen( pz_shell, "w" ); |
62 |
if (fp == (FILE*)NULL) { |
if (fp == (FILE*)NULL) { |
63 |
tSCC zErr[] = "%s error: fs error %d (%s) on popen( \"%s\",\"w\")\n"; |
tSCC zErr[] = "%s error: fs error %d (%s) on popen( \"%s\",\"w\")\n"; |
64 |
fprintf( stderr, zErr, ltmainOptions.pzProgPath, errno, |
fprintf( stderr, zErr, libtoolOptions.pzProgPath, errno, |
65 |
strerror( errno ), pz_shell ); |
strerror( errno ), pz_shell ); |
66 |
exit( EXIT_FAILURE ); |
exit( EXIT_FAILURE ); |
67 |
} |
} |
79 |
CKSERV; |
CKSERV; |
80 |
fputs( apz_mode_cmd[ 0 ], fp ); |
fputs( apz_mode_cmd[ 0 ], fp ); |
81 |
CKSERV; |
CKSERV; |
82 |
fprintf( fp, zChkEcho, ltmainOptions.pzProgPath ); |
fprintf( fp, zChkEcho, libtoolOptions.pzProgPath ); |
83 |
CKSERV; |
CKSERV; |
84 |
|
|
85 |
fprintf( fp, zQuiet, HAVE_OPT( QUIET ) ? ":" : "\"$echo\"" ); |
fprintf( fp, zQuiet, HAVE_OPT( QUIET ) ? ":" : "\"$echo\"" ); |
96 |
|
|
97 |
if (HAVE_OPT( DEBUG )) { |
if (HAVE_OPT( DEBUG )) { |
98 |
fprintf( stderr, "%s: enabling shell trace mode\n", |
fprintf( stderr, "%s: enabling shell trace mode\n", |
99 |
ltmainOptions.pzProgName ); |
libtoolOptions.pzProgName ); |
100 |
fputs( zDbgFmt, fp ); |
fputs( zDbgFmt, fp ); |
101 |
} |
} |
102 |
CKSERV; |
CKSERV; |
119 |
* Insert our modal stuff and one shell option processing dinkleberry |
* Insert our modal stuff and one shell option processing dinkleberry |
120 |
* that one of the command scripts depends upon. |
* that one of the command scripts depends upon. |
121 |
*/ |
*/ |
122 |
fprintf( fp, zModeName, ltmainOptions.pzProgName, |
fprintf( fp, zModeName, libtoolOptions.pzProgName, |
123 |
ltmainOptions.pOptDesc[ WHICH_OPT_COMPILE ].pz_Name ); |
libtoolOptions.pOptDesc[ OPT_VALUE_MODE ].pz_Name ); |
124 |
CKSERV; |
CKSERV; |
125 |
fprintf( fp, zMode, ltmainOptions.pzProgName ); |
fprintf( fp, zMode, libtoolOptions.pzProgName ); |
126 |
CKSERV; |
CKSERV; |
127 |
|
|
128 |
/* |
/* |
151 |
* macro will detect that, call closeScript() and return so as to |
* macro will detect that, call closeScript() and return so as to |
152 |
* avoid segfaults and more SIGPIPEs. |
* avoid segfaults and more SIGPIPEs. |
153 |
*/ |
*/ |
154 |
fputs( apz_mode_cmd[ WHICH_OPT_COMPILE ], fp ); |
fputs( apz_mode_cmd[ OPT_VALUE_MODE ], fp ); |
155 |
CLOSEOK; |
CLOSEOK; |
156 |
|
|
157 |
fputc( '\n', fp ); |
fputc( '\n', fp ); |