1 - The outfile entry is only used when the output file must not be thrown
away. 2 - If a combiner has no named input file (only libs+flags) then issue a warning message and make up a name.
This commit is contained in:
parent
68a6231d11
commit
527726167a
1 changed files with 14 additions and 4 deletions
|
@ -67,9 +67,10 @@ setfiles(phase) register trf *phase ; {
|
||||||
in.p_keep=YES ;
|
in.p_keep=YES ;
|
||||||
in.p_keeps=NO ;
|
in.p_keeps=NO ;
|
||||||
}
|
}
|
||||||
if ( phase->t_outfile ) {
|
if ( phase->t_outfile && phase->t_keep ) {
|
||||||
out.p_path=phase->t_outfile ;
|
out.p_path=phase->t_outfile ;
|
||||||
out.p_keeps=NO ;
|
out.p_keeps=NO ;
|
||||||
|
out.p_keep=YES ;
|
||||||
} else {
|
} else {
|
||||||
gr_init(&pathname) ;
|
gr_init(&pathname) ;
|
||||||
if ( !phase->t_keep && !t_flag ) {
|
if ( !phase->t_keep && !t_flag ) {
|
||||||
|
@ -78,8 +79,16 @@ setfiles(phase) register trf *phase ; {
|
||||||
gr_cat(&pathname,template) ;
|
gr_cat(&pathname,template) ;
|
||||||
gr_cat(&pathname,unique()) ;
|
gr_cat(&pathname,unique()) ;
|
||||||
out.p_keep=NO ;
|
out.p_keep=NO ;
|
||||||
|
} else {
|
||||||
|
if ( !p_basename ) {
|
||||||
|
gr_cat(&pathname,"Ack") ;
|
||||||
|
gr_cat(&pathname,unique()) ;
|
||||||
|
p_basename=keeps(gr_start(pathname)) ;
|
||||||
|
werror("Output written on %s%s",
|
||||||
|
p_basename,phase->t_out) ;
|
||||||
} else {
|
} else {
|
||||||
gr_cat(&pathname,p_basename) ;
|
gr_cat(&pathname,p_basename) ;
|
||||||
|
}
|
||||||
out.p_keep=YES ;
|
out.p_keep=YES ;
|
||||||
}
|
}
|
||||||
gr_cat(&pathname,phase->t_out) ;
|
gr_cat(&pathname,phase->t_out) ;
|
||||||
|
@ -167,8 +176,9 @@ add_input(file,phase) path *file ; trf *phase ; {
|
||||||
file->p_path,phase->t_name) ;
|
file->p_path,phase->t_name) ;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if ( !l_first(phase->t_inputs) ) {
|
phase->t_do=YES ;
|
||||||
/* This becomes the first entry in the input list */
|
if ( !phase->t_origname && orig.p_path[0]!='-' ) {
|
||||||
|
/* This entry decides the name of the result */
|
||||||
phase->t_origname= orig.p_path ;
|
phase->t_origname= orig.p_path ;
|
||||||
}
|
}
|
||||||
store= (path *) getcore(sizeof (path)) ;
|
store= (path *) getcore(sizeof (path)) ;
|
||||||
|
|
Loading…
Add table
Reference in a new issue