LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 04: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 04:35 PM.
 
Old 11-12-2008, 04:14 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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 04:17 PM.
 
Old 11-12-2008, 04: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, 04:27 PM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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, 05:34 PM   #5
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,364

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
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, 06: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, 10:39 PM   #7
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
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-12-2008, 11:33 PM   #8
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,364

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
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-12-2008 at 11:48 PM.
 
Old 11-13-2008, 08:04 AM   #9
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
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, 01:59 PM   #10
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,257
Blog Entries: 24

Rep: Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193Reputation: 4193
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 02: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 12:53 PM
GSB.SlackBuild ran on Slack-Current acummings Slackware 7 08-04-2006 08:30 AM
fluxbox backgrounds in -current bl0tt0 Slackware 6 06-21-2006 04:39 PM
slackware current with fluxbox 0.9 in /xap slackie1000 Slackware 8 09-09-2004 07:40 AM
how to install a current version of fluxbox? Vincent Debian 1 02-15-2004 10:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:58 AM.

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
Open Source Consulting | Domain Registration