Build using scons


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Build using scons
# 1  
Old 10-11-2014
Build using scons

I have a tree structure as follows:

Code:
/vik/build/sc/botoh.sc
/vik/lib/endian.f 
/vik/utils/botoh.f

Then I run the build script as

Code:
cd vik/build/sc
scons -f botoh.sc

The above shows that the SConstruct botoh.sc is down a few levels, and it
may be easiest to have the main SConstruct botoh.sc at the top level.

I'm not sure if it is the friendliest thing for users to have to cd down a couple
of levels before invoking the build script, whatever build system it is.
# 2  
Old 10-11-2014
Code:
scons -f /vik/build/sc/botoh.sc

# 3  
Old 10-11-2014
Quote:
Originally Posted by Aia
Code:
scons -f /vik/build/sc/botoh.sc

The above produces errors

Code:
scons -f build/sc/botoh.sc
scons: Reading SConscript files ...
Could not locate endian.f
Could not locate botoh.f
scons: done reading SConscript files.
scons: Building targets ...
gfortran -o botoh.x -g
gfortran: fatal error: no input files; unwilling to write output files
compilation terminated.
scons: *** [botoh.x] Error 1
scons: building terminated because of errors.

# 4  
Old 10-11-2014
Quote:
Originally Posted by kristinu
The above produces errors

Code:
scons -f build/sc/botoh.sc
scons: Reading SConscript files ...
Could not locate endian.f
Could not locate botoh.f
scons: done reading SConscript files.
scons: Building targets ...
gfortran -o botoh.x -g
gfortran: fatal error: no input files; unwilling to write output files
compilation terminated.
scons: *** [botoh.x] Error 1
scons: building terminated because of errors.

That's not the same that scons -f /vik/build/sc/botoh.sc
# 5  
Old 10-11-2014
Quote:
Originally Posted by Aia
That's not the same that scons -f /vik/build/sc/botoh.sc
Using full path works as you said. How does that happen?

The following also works

Code:
scons -f /build/sc/botoh.sc


Last edited by kristinu; 10-11-2014 at 02:58 PM..
# 6  
Old 10-11-2014
Quote:
Originally Posted by kristinu
Using full path works as you said. How does that happen?

The following also works

Code:
scons -f /build/sc/botoh.sc

Not quite sure what your question implies.

/build/sc/botoh.sc is a full path all the way from the root of the filesystem, and so it is /vik/build/sc/botoh.sc, as long it exists the command can continue.
build/sc/botoh.sc is a relative path, it has to exist in whatever current directory you are launching the program from.

Sorry, if this was too simple, you knew this already or that's not what you were asking.
# 7  
Old 10-11-2014
Sure, however the following work fine

Code:
cd /home/cdi/resip/vik/
scons -f /build/sc/botoh.sc

cd /home/cdi/resip/vik/build/sc
scons -f botoh.sc

whereas the following do not

Code:
cd /home/cdi/resip/vik/
scons -f ./build/sc/botoh.sc

cd /home/cdi/resip/vik/
scons -f build/sc/botoh.sc


Last edited by kristinu; 10-11-2014 at 05:20 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

(VS 2008) New build config looking files from other folder build config

Hi Team, My new build configuration always looking for the files from the build where i copied from. please help me to resolve this. I am using Visual studio 2008.It has Qt 4.8. plugins,qml,C++ development I created new debug_new build configuration with additional preprocessor from the... (1 Reply)
Discussion started by: SA_Palani
1 Replies

2. UNIX for Advanced & Expert Users

Using scons

I am trying to use scons to build a program in fortran 2008. I am using a makefile to build the program as follows all: /home/cdim/Local/gcc-4.9.0/bin/gfortran -ffree-form -c endian.f /home/cdim/Local/gcc-4.9.0/bin/gfortran -ffree-form -c testconvert.f ... (0 Replies)
Discussion started by: kristinu
0 Replies

3. Shell Programming and Scripting

Build.xml invocation by Build Script

Hi I have a build.xml file and I can run it on Windows via cmd. Now I want to write a script to invoke the same. Is there a way to do this? (1 Reply)
Discussion started by: ankur328
1 Replies

4. UNIX for Dummies Questions & Answers

Adding SDK Build on Kernel Source Build

Hi, So I downloaded this kernel source and was able to build it successfully. But I want to add this SDK source code inside, can anyone help me how to do this? Note that the SDK source can be built by itself. I added the SDK in the main Makefile: init-y := init/ #added SDK... (0 Replies)
Discussion started by: h0ujun
0 Replies

5. Shell Programming and Scripting

Build failure

Hey everyone, I'm using Linux Mint Debian Edition Gnome, and I'm trying to add the Oracle JDK to the repositories using this simple script, which has never let me down before, but it keeps giving me this error every time I run it, here's my output: eddie_nygma@enigmatics ~ $ sudo ./oab-java.sh ... (0 Replies)
Discussion started by: Quizmaster
0 Replies

6. Programming

Build Error

I am facing a problem while building the device driver code. I am using suse linux "2.6.31.5-0.1-desktop" on my Laptop. I have copied a folder containing self written device driver files from Mandriva linux to my system having Suse Linux. I copied the entire folder in "/home/netuser/sun/".... (4 Replies)
Discussion started by: rupeshkp728
4 Replies

7. Emergency UNIX and Linux Support

Which OS Binary was build

We have recently installed RHEL 5.4 on some existing 6.2 OS and migrated our code from RH 6.2 to RHEL 5.4. We are facing a difficulty that given a binary (on both OS they have same name) how can we distinguish that which gcc and OS it was build as there are some minor differences in between binary... (2 Replies)
Discussion started by: uunniixx
2 Replies

8. UNIX for Advanced & Expert Users

Problem during build

Hi, When i'm compiling my C files, I'm getting an error saying that the file name i've defined is undeclared. Could someone tell me how to solve this error. I've defined the file name as #define _FILE_CODE_ _XYZ_C_ The error is "_XYZ_C undeclared". Thanks in advance (1 Reply)
Discussion started by: laxmi
1 Replies
Login or Register to Ask a Question