Question

I have a makefile (intended for nmake) with the following contents.

w = \
abort_.obj \
backspac.obj \
c_abs.obj \
c_cos.obj \
c_div.obj \
c_exp.obj \
c_log.obj \
c_sin.obj \
c_sqrt.obj \
cabs.obj \
close.obj \
d_abs.obj \
d_acos.obj \
d_asin.obj \
d_atan.obj \
d_atn2.obj \
d_cnjg.obj \
d_cos.obj \
d_cosh.obj \
d_dim.obj \
d_exp.obj \
d_imag.obj \
d_int.obj \
d_lg10.obj \
d_log.obj \
d_mod.obj \
d_nint.obj \
d_prod.obj \
d_sign.obj \
d_sin.obj \
d_sinh.obj \
d_sqrt.obj \
d_tan.obj \
d_tanh.obj \
derf_.obj \
derfc_.obj \
dfe.obj \
dolio.obj \
dtime_.obj \
due.obj \
ef1asc_.obj \
ef1cmc_.obj \
endfile.obj \
erf_.obj \
erfc_.obj \
err.obj \
etime_.obj \
exit_.obj \
f77_aloc.obj \
f77vers.obj \
fmt.obj \
fmtlib.obj \
ftell_.obj \
getarg_.obj \
getenv_.obj \
h_abs.obj \
h_dim.obj \
h_dnnt.obj \
h_indx.obj \
h_len.obj \
h_mod.obj \
h_nint.obj \
h_sign.obj \
hl_ge.obj \
hl_gt.obj \
hl_le.obj \
hl_lt.obj \
i77vers.obj \
i_abs.obj \
i_dim.obj \
i_dnnt.obj \
i_indx.obj \
i_len.obj \
i_mod.obj \
i_nint.obj \
i_sign.obj \
iargc_.obj \
iio.obj \
ilnw.obj \
inquire.obj \
l_ge.obj \
l_gt.obj \
l_le.obj \
l_lt.obj \
lbitbits.obj \
lbitshft.obj \
lread.obj \
lwrite.obj \
main.obj \
open.obj \
pow_ci.obj \
pow_dd.obj \
pow_di.obj \
pow_hh.obj \
pow_ii.obj \
pow_ri.obj \
pow_zi.obj \
pow_zz.obj \
r_abs.obj \
r_acos.obj \
r_asin.obj \
r_atan.obj \
r_atn2.obj \
r_cnjg.obj \
r_cos.obj \
r_cosh.obj \
r_dim.obj \
r_exp.obj \
r_imag.obj \
r_int.obj \
r_lg10.obj \
r_log.obj \
r_mod.obj \
r_nint.obj \
r_sign.obj \
r_sin.obj \
r_sinh.obj \
r_sqrt.obj \
r_tan.obj \
r_tanh.obj \
rdfmt.obj \
rewind.obj \
rsfe.obj \
rsli.obj \
rsne.obj \
s_cat.obj \
s_cmp.obj \
s_copy.obj \
s_paus.obj \
s_rnge.obj \
s_stop.obj \
sfe.obj \
sig_die.obj \
signal_.obj \
sue.obj \
system_.obj \
typesize.obj \
uio.obj \
uninit.obj \
util.obj \
wref.obj \
wrtfmt.obj \
wsfe.obj \
wsle.obj \
wsne.obj \
xwsne.obj \
z_abs.obj \
z_cos.obj \
z_div.obj \
z_exp.obj \
z_log.obj \
z_sin.obj \
z_sqrt.obj

-----------snip----------------------------

vcf2c.lib: $w
    lib -out:vcf2c.lib @libf2c.lbc

What does the @ in front of, "libf2c.lbc," do? In a batch file @ suppresses output but I don't see how that applies.

Was it helpful?

Solution

It's a LIB command file. As described on the page I linked:

You can pass command-line arguments to LIB in a command file using the following syntax:

LIB @commandfile

The file commandfile is a text file. No space or tab is allowed between the at sign (@) and the file name. There is no default extension; you must specify the full file name, including any extension. Wildcards cannot be used. You can specify an absolute or relative path with the file name.

In the command file, arguments can be separated by spaces or tabs, as they can on the command line; they can also be separated by newline characters. Use a semicolon (;) to mark a comment. LIB ignores all text from the semicolon to the end of the line.

You can specify either all or part of the command line in a command file, and you can use more than one command file in a LIB command. LIB accepts the command-file input as if it were specified in that location on the command line. Command files cannot be nested. LIB echoes the contents of command files unless the /NOLOGO option is used.

OTHER TIPS

It's a common convention on some systems (but not universally supported on any system) that a filename preceded by an @ means that the program should read the contents of the file and interpret the contents as arguments to the program.

So in your case, the lib program will read in the file libf2c.lbc and use its contents as arguments.

I guess it's possible that this is a feature of nmake, I don't know much about nmake. It's certainly not part of any "traditional" make program.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top