Find the answer to your Linux question:
Results 1 to 4 of 4
whats the difference between doing these ./configure && make && make install and ./configure; make; make install...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2003
    Posts
    41

    got a dumb question since its slow in here right now


    whats the difference between doing these

    ./configure &&
    make &&
    make install

    and

    ./configure; make; make install

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    The && and || keywords in the shell works just like they would in C, ie. ./configure && make && make install doesn't execute the rest of the commands if one fails. (eg. if make fails, it won't try and install). The basic function is that it executes the commands each in turn, waiting for each, and if one returns non-zero, the rest of the commands aren't executed, and the exit status of the entire expression is that of the command that returned non-zero. || does the opposite, ie. it goes on until one succeeds.

  3. #3
    Just Joined!
    Join Date
    Mar 2003
    Posts
    14
    ..so what does the ; between commands do?

    I assume it defaults to || by the subject of your posting?

  4. #4
    Linux Enthusiast
    Join Date
    Jun 2002
    Location
    San Antonio
    Posts
    621
    not quite. &&, and || are what they call "short circuit" operators I believe. So if you try `ls || echo "hello"` it will not echo hello as long as ls didn't error out. the ';' just says "I don't care what happened on the last command, just execute this". Semantic differences, but still important.
    I respectfully decline the invitation to join your delusion.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •