scons

Scons VariantDir() duplicated CPPPATH and LIBPATH when compiling?

北城以北 提交于 2020-02-22 04:19:41
问题 Here's my simple case. I got a source file structure as following: . ├── SConstruct └── src ├── SConscript ├── staticLib │ ├── classInStaticLib.cpp │ ├── classInStaticLib.h │ └── SConscript └── test.cpp SConstruct: VariantDir('build', 'src', duplicate=0) SConscript('build/SConscript') src/SConscript: import os lib = 'staticLib' SConscript(os.path.join(lib, 'SConscript')) Program( 'test', 'test.cpp', CPPPATH = lib, LIBS = lib, LIBPATH = lib ) src/staticLib/SConscript: Library('staticLib',

Scons VariantDir() duplicated CPPPATH and LIBPATH when compiling?

本秂侑毒 提交于 2020-02-22 04:13:26
问题 Here's my simple case. I got a source file structure as following: . ├── SConstruct └── src ├── SConscript ├── staticLib │ ├── classInStaticLib.cpp │ ├── classInStaticLib.h │ └── SConscript └── test.cpp SConstruct: VariantDir('build', 'src', duplicate=0) SConscript('build/SConscript') src/SConscript: import os lib = 'staticLib' SConscript(os.path.join(lib, 'SConscript')) Program( 'test', 'test.cpp', CPPPATH = lib, LIBS = lib, LIBPATH = lib ) src/staticLib/SConscript: Library('staticLib',

When changing the comment of a .c file, scons still re-compile it?

旧街凉风 提交于 2020-01-25 21:40:07
问题 It's said that scons uses MD5 signature as default decider to dertermine whether a source file needs re-compilation. E.g. I've got SConstruct as below: Library('o.c') And my o.c is: $ cat o.c /*commented*/ #include<stdio.h> int f(){ printf("hello\n"); return 2; } Run scons and remove the comment line, run scons again. I expect that scons should not compile it again, but actually it's: gcc -o o.o -c o.c scons: done building targets. If I change SConstruct file to add one line: Decider('MD5').

Using scons to generate latex source files and compile pdf

可紊 提交于 2020-01-25 09:52:07
问题 I am working on a book. The chapters are stored in markdown files. I use pandoc to generate the LaTeX-Files of the chapters. Here is the structure of the project: Book/Manuscript: contains the markdown files Book/Editions/PDF/tex: contains the generated LaTeX files Book/Editions/PDF/Layout_1/: first layout of the book Book/Editions/PDF/Layout_2/: second layout of the book I would like to use scons to generate the latex files and to call LaTeX to compile the PDFs. scons set up Book/SConstruct:

关于svn服务部署方案

醉酒当歌 提交于 2020-01-25 03:03:12
本文只记录我的笔记 首先, 我是个懒人, 写好了shell, 直接上传把 安装包: SvnPackages-chenglee 第一, 无非就是搞掂依赖这一块 #************************************************************************* # > File Name: SuperRoot.sh # > Author: chenglee # > Main : chengkenlee@sina.com # > Blog : http://www.cnblogs.com/chenglee/ # > Created Time : 2019年07月04日 星期四 20时43分25秒 #************************************************************************* #!/bin/bash yum -y install zlib zlib-devel openssl openssl-devel expat-devel gcc gcc-c++ cmake lrzsz bzip2 第二, 编译安装 #************************************************************************* # > File

centos7源码编译安装Subversion 1.9.5

早过忘川 提交于 2020-01-25 03:01:54
svn是Subversion的简称,是一个开放源代码的版本控制系统。 svn有两种运行方式:1、独立服务器(svn://xxx.xxx/xxx) 2、借助apache(http://svn.xxx.xxx/xxx) svn存储版本数据也有两种方式:1、BDB(事务安全型表类型) 2、FSFS(一种不需要数据库存储系统) 因为BDB方式在服务中断时,可能锁住数据,这里我们选择独立服务器和FSFS方式安装svn。 一、下载安装Subversion必要的源码文件 安装svn需要apr,apr-util,zlib,serf,openssl的支持,serf的编译安装又需要scons 所以这里我们用yum来安装zlib和openssl,源码编译apr,apr-util,serf,scons subversion源码包 http://mirrors.cnnic.cn/apache/subversion/subversion-1.9.5.tar.gz apr源码包 http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.5.2.tar.gz apr-util源码包 http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.5.4.tar.gz serf源码包 https://www

Tell SCons not to auto-create directories?

隐身守侯 提交于 2020-01-24 09:39:08
问题 I'm trying to make SCons check out a git repo that I need (and hopefully keep that repo up-to-date). The problem is that I have to tell it which files the git repo contains for it to use them in the build, and if I do that, SCons will create the repo before it tries to clone it. For example, say I want to clone GStreamer, and use the create-uninstalled-setup.sh script (this isn't what I'm actually doing, but it's a much simpler/faster script that exibits the same problem): Command(['gstreamer

How to force scons to generate binary file with .bin extension?

让人想犯罪 __ 提交于 2020-01-17 03:05:13
问题 I have the following sconstruct import glob import os for file in glob.glob("*.cpp"): Program([file]) I am using this on a *nix platform so scons automatically generate executable file with the same name from the same name as the source file. I am just wondering how can I force it to generate executable files with a exe or a bin extension? Thanks! 回答1: The extension that gets appended to each created program is stored in the environment variable "PROGSUFFIX". You can override the default

scons dependency problems in a hierarchical build with variant dirs

南楼画角 提交于 2020-01-16 04:24:26
问题 Im new to scons and am having problems with scons dependancies in a hierarchichal build with a variant directory. Im able to reproduce the problem in a reduced environment that consists of 2 subdirs under the SConscript directory (moduleA and moduleB) as follows: . |-- SConstruct |-- file.conf |-- moduleA | |-- SConscript | `-- conf2cc `-- moduleB |-- SConscript `-- fileB.cc Here is the flow of what needs to be done: moduleA executes a shell script: conf2cc, input: $projRootDir/file.conf,

Get scons to generate a new build number

泄露秘密 提交于 2020-01-15 09:13:37
问题 I'd like to get scons to read a previous version number from a file, update a source file with a new version number and current date and then write the number back to the original file ready for the next build. This needs to happen only when the target is out of date. IOW the version number doesn't change if no build takes place. The original file is source controlled and isn't a source file else it could trigger another build on check-in (due to CI). CLARIFICATION From scons' point of view