LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-12-2008, 05:03 PM   #1
wadsworth
Member
 
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 215

Rep: Reputation: 65
fluxbox.SlackBuild in -current typo?(solved_no typo)


On line #65 of the fluxbox.SlackBuild from -current I'm seeing:
Code:
make -j6 || make || exit 1
make install DESTDIR=$PKG || exit 1
If I understand the "||" in a bash script, it seems that "make" would be
executed twice. Am I wrong or is this a typo?
If it is, whom should I tell?

From the bash man page:
Code:
command1 || command2

       command2  is  executed  if and only if command1 returns a non-zero exit
       status.  The return status of AND and OR lists is the  exit  status  of
       the last command executed in the list.
Thanks!

Last edited by wadsworth; 11-12-2008 at 05:35 PM.
 
Old 11-12-2008, 05:14 PM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
make will be executed if 'make -j6' fails, else the command stops and goes to next command line (make install...)

Last edited by keefaz; 11-12-2008 at 05:17 PM.
 
Old 11-12-2008, 05:24 PM   #3
wadsworth
Member
 
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 215

Original Poster
Rep: Reputation: 65
Quote:
Originally Posted by keefaz View Post
make will be executed if 'make -j6' fails, else the command stops and goes to next command line (make install...)
OK. I think I understand. If 'make -j6' succeeds, neither the
subsequent 'make' nor the 'exit 1' will be executed. right?
This is the first time I've seen this in a SlackBuild.
 
Old 11-12-2008, 05:27 PM   #4
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
Yes, that's it
I would think if 'make -j6' fails, the following make has great chance to fail too, but I don't know for sure
 
Old 11-12-2008, 06:34 PM   #5
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 650

Rep: Reputation: 92
Seems to be feature of PV's newer slackbuilds. If you look at one I stole for 12.1:

http://slackware.osuosl.org/slackwar...lrn.SlackBuild

this has been added in as a variable: NUMJOBS=${NUMJOBS:--j6}. I have added this setting to my personal slackbuilds and I have seen amazing speed differences in compiling times, particularly in such software as the svn MPlayer.

Andrew
 
Old 11-12-2008, 07:04 PM   #6
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423

Rep: Reputation: 45
I think if "make -j6" fail, it means that the project may has some problem with parallel making. So trying a single make may solve the problem. But if "make" failed eventually, there must be something wrong here, so it will exit.
 
Old 11-12-2008, 11:39 PM   #7
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,944

Rep: Reputation: Disabled
Quote:
Originally Posted by grissiom View Post
I think if "make -j6" fail, it means that the project may has some problem with parallel making. So trying a single make may solve the problem. But if "make" failed eventually, there must be something wrong here, so it will exit.
We have a winner. :-)
 
Old 11-13-2008, 12:33 AM   #8
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 650

Rep: Reputation: 92
Hi Rob:

Quote:
Originally Posted by rworkman View Post
We have a winner. :-)
And perhaps this syntax has a place in the slackbuilds.org template?

Andrew

Edit: Apologies if I am coming close to thread hijacking?

Last edited by andrew.46; 11-13-2008 at 12:48 AM.
 
Old 11-13-2008, 09:04 AM   #9
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,944

Rep: Reputation: Disabled
Quote:
Originally Posted by andrew.46 View Post
And perhaps this syntax has a place in the slackbuilds.org template?
Nah, we decided not to put that in our builds. If someone wants parallel make jobs with our stuff, they can set MAKEFLAGS in the shell environment.
 
Old 11-13-2008, 02:59 PM   #10
astrogeek
Senior Member
 
Registered: Oct 2008
Distribution: Slackware [64]X{.0|.1|.2|-current} ::X>=12<=14, FreeBSD_10{.0|.1}
Posts: 2,137

Rep: Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846
What does -j do? Good article here...

For others like myself who might not be up to speed on distributed compile options, here is a place to get started...

http://www.ibm.com/developerworks/ai...2ProgramDelite

Last edited by astrogeek; 11-13-2008 at 03:08 PM. Reason: changed 'parallel' to 'distributed' - more appropriate word...
 
  


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
Typo in slackware-current/source/a/lilo/liloconfig drumz Slackware 7 02-22-2008 01:53 PM
GSB.SlackBuild ran on Slack-Current acummings Slackware 7 08-04-2006 09:30 AM
fluxbox backgrounds in -current bl0tt0 Slackware 6 06-21-2006 05:39 PM
slackware current with fluxbox 0.9 in /xap slackie1000 Slackware 8 09-09-2004 08:40 AM
how to install a current version of fluxbox? Vincent Debian 1 02-15-2004 11:46 AM


All times are GMT -5. The time now is 10:04 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration