LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-10-2004, 09:11 AM   #1
timsch75
Member
 
Registered: Feb 2004
Location: austin, TX
Distribution: slackware 10
Posts: 169

Rep: Reputation: 30
what does && mean in compiling instructions


I'm looking at compiling Mplayer and the instructions I'm following keep using the string && in their descriptions. For example:

./configure --prefix=/usr &&
make &&
make install

comes up for the Installation of GLib. This is the same for instructions for other applications/libraries. Is this indicating that I should type in an appropriate directory/file name or something else?

thanks
 
Old 03-10-2004, 09:20 AM   #2
thereof
Member
 
Registered: Jan 2003
Location: Sweden
Distribution: Slackware
Posts: 54

Rep: Reputation: 15
&& = and

Which basically means that you should run the commands ./configure --prefix=/usr and make and make install. First run the ./configure command and when that is done, run make etc.
 
Old 03-10-2004, 01:28 PM   #3
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
A bit more though

; would mean: and

Whereas:
&&
Means: Only complete the next step if this first steps completes successfully (or has an output of 1). It's very useful in compiling a bunch of steps that require the first ones to complete successfully, such as configure:
./configure --with-whatever &&
make

Because you don't want to run make unless you have everything configured properly.

Cool
 
Old 03-10-2004, 03:43 PM   #4
timsch75
Member
 
Registered: Feb 2004
Location: austin, TX
Distribution: slackware 10
Posts: 169

Original Poster
Rep: Reputation: 30
MasterC, you indicate that the && are used in a single string entered on the command line that the computer is to interpret as a sequence of events that are to occur if only the previous one does, whereas Thereof makes me think that they are basically shorthand instructions to the user. If I am correct, which one of you is right?

thanks
 
Old 03-10-2004, 03:53 PM   #5
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
When a proram executes successfully, it gives the value '0' to the os to show that it did. If it gives something else, there was an error.
'&&' is the logical AND. It works like this:
true && true = true
true && false = false
false && true = false
Let's say the 0 a program returns to the os is 'true', and anything else is 'false'. You have two programs, A and B:
A && B
If A is successful, A=true. If not, it is false. Say A failed. This would be the result:
false && true
Which means the operation overall failed. The computer is lazy, and doesn't even run program B, because it knows the result of 'false && true' is false no matter what B is.

Last edited by aaa; 03-10-2004 at 03:55 PM.
 
Old 03-11-2004, 02:18 AM   #6
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Quote:
Originally posted by timsch75
MasterC, you indicate that the && are used in a single string entered on the command line that the computer is to interpret as a sequence of events that are to occur if only the previous one does, whereas Thereof makes me think that they are basically shorthand instructions to the user. If I am correct, which one of you is right?

thanks
Just to be direct - && is entered on the command line (or in the code) and is also a general instruction to the user in docs. They can type it exactly, as MasterC indicates, or type it in sequence as Thereof says (logically equivalent, but more steps for the user) - but it's intended as a single command string. So they're both right - but MasterC is righter.
 
Old 03-11-2004, 07:23 AM   #7
samsbox
LQ Newbie
 
Registered: Mar 2004
Location: Telford, UK
Distribution: Red Hat 9
Posts: 13

Rep: Reputation: 0
Basically put: it means to do something then do something else when it has finished (i think :P)

e.g.

make && make install
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
zsnes && logitech dual action gamepad && dpad woes John5788 Linux - Games 5 10-29-2008 10:56 PM
(FreeBSD && Fedora Core 4 && Slackware 10.0) Filesystem Support taylor_venable *BSD 1 07-14-2005 03:24 PM
Japanese canna won't work : Warning: かな漢字変&am OrganicOrange84 Debian 3 06-30-2005 03:28 PM
Phục hồi dữ liệu bị mất???, cứ pollsite General 1 06-27-2005 01:39 PM
SuSE9 && Samba && Win2k DaFrEQ Linux - Software 2 01-27-2004 08:45 AM


All times are GMT -5. The time now is 09:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration