0

The following is taken from the GNU ld configure file:

if test $ac_verc_fail = yes; then 
  LD=: critic_missing="$critic_missing ld"
fi

What's the meaning of the colon?

duleshi
  • 1,966
  • 2
  • 21
  • 32

2 Answers2

1

The : is a shell builtin that is basically equivalent to the true command. It is often used as a no-op, e.g. after an if statement. Please see this excellent reply by @earl for more information.

Best regards //KH.

Community
  • 1
  • 1
Karl-Henrik
  • 1,113
  • 1
  • 11
  • 17
  • I had in fact read the link before I posted the question. What's misleading is the two clauses being put in a single line without a semicolon between them. I had never done that before. – duleshi Mar 10 '14 at 08:22
  • 3
    In `LD=:`, colon is not a builtin, it is just a value assigned to a variable. – choroba Mar 10 '14 at 09:10
0

I propose an alternative : I believe it could be a typo ...

It could be meant to be:

LD=; critic_missing="$critic_missing ld"

which is equivalent to (but less readable than):

LD="" ; critic_missing="$critic_missing ld"

That would fit better with the following statement critic_missing="$critic_missing_ld" ?

(whereas in your post ld is not realling missing, it's set to ":")

Olivier Dulac
  • 3,695
  • 16
  • 31