Add reproducible
This commit is contained in:
commit
aaf77ed513
19
.gitattributes
vendored
Normal file
19
.gitattributes
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# This is a good default: files that are auto-detected by git to be text are
|
||||||
|
# converted to the platform-native line ending (LF on Unix, CRLF on Windows)
|
||||||
|
# in the working tree and to LF in the repository.
|
||||||
|
#
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# Use `eol=crlf` for files that should have the CRLF line ending both in the
|
||||||
|
# working tree (even on Unix) and in the repository.
|
||||||
|
#
|
||||||
|
#*.bat text eol=crlf
|
||||||
|
|
||||||
|
# Use `eol=lf` for files that should have the LF line ending both in the
|
||||||
|
# working tree (even on Windows) and in the repository.
|
||||||
|
#
|
||||||
|
#*.sh text eol=lf
|
||||||
|
|
||||||
|
# Use `binary` to make sure certain files are never auto-detected as text.
|
||||||
|
#
|
||||||
|
#*.png binary
|
31
.gitignore
vendored
Normal file
31
.gitignore
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
.bdep/
|
||||||
|
|
||||||
|
# Local default options files.
|
||||||
|
#
|
||||||
|
.build2/local/
|
||||||
|
|
||||||
|
# Compiler/linker output.
|
||||||
|
#
|
||||||
|
*.d
|
||||||
|
*.t
|
||||||
|
*.i
|
||||||
|
*.i.*
|
||||||
|
*.ii
|
||||||
|
*.ii.*
|
||||||
|
*.o
|
||||||
|
*.obj
|
||||||
|
*.gcm
|
||||||
|
*.pcm
|
||||||
|
*.ifc
|
||||||
|
*.so
|
||||||
|
*.dylib
|
||||||
|
*.dll
|
||||||
|
*.a
|
||||||
|
*.lib
|
||||||
|
*.exp
|
||||||
|
*.pdb
|
||||||
|
*.ilk
|
||||||
|
*.exe
|
||||||
|
*.exe.dlls/
|
||||||
|
*.exe.manifest
|
||||||
|
*.pc
|
44
README.md
Normal file
44
README.md
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# reproduce - An executable
|
||||||
|
|
||||||
|
The `reproduce` executable is a <SUMMARY-OF-FUNCTIONALITY>.
|
||||||
|
|
||||||
|
Note that the `reproduce` executable in this package provides `build2` metadata.
|
||||||
|
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
To start using `reproduce` in your project, add the following build-time
|
||||||
|
`depends` value to your `manifest`, adjusting the version constraint as
|
||||||
|
appropriate:
|
||||||
|
|
||||||
|
```
|
||||||
|
depends: * reproduce ^<VERSION>
|
||||||
|
```
|
||||||
|
|
||||||
|
Then import the executable in your `buildfile`:
|
||||||
|
|
||||||
|
```
|
||||||
|
import! [metadata] <TARGET> = reproduce%exe{<TARGET>}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Importable targets
|
||||||
|
|
||||||
|
This package provides the following importable targets:
|
||||||
|
|
||||||
|
```
|
||||||
|
exe{<TARGET>}
|
||||||
|
```
|
||||||
|
|
||||||
|
<DESCRIPTION-OF-IMPORTABLE-TARGETS>
|
||||||
|
|
||||||
|
|
||||||
|
## Configuration variables
|
||||||
|
|
||||||
|
This package provides the following configuration variables:
|
||||||
|
|
||||||
|
```
|
||||||
|
[bool] config.reproduce.<VARIABLE> ?= false
|
||||||
|
```
|
||||||
|
|
||||||
|
<DESCRIPTION-OF-CONFIG-VARIABLES>
|
4
build/.gitignore
vendored
Normal file
4
build/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
/config.build
|
||||||
|
/root/
|
||||||
|
/bootstrap/
|
||||||
|
build/
|
7
build/bootstrap.build
Normal file
7
build/bootstrap.build
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
project = reproduce
|
||||||
|
|
||||||
|
using version
|
||||||
|
using config
|
||||||
|
using test
|
||||||
|
using install
|
||||||
|
using dist
|
16
build/root.build
Normal file
16
build/root.build
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Uncomment to suppress warnings coming from external libraries.
|
||||||
|
#
|
||||||
|
#cxx.internal.scope = current
|
||||||
|
|
||||||
|
cxx.std = latest
|
||||||
|
|
||||||
|
using cxx
|
||||||
|
|
||||||
|
hxx{*}: extension = hxx
|
||||||
|
ixx{*}: extension = ixx
|
||||||
|
txx{*}: extension = txx
|
||||||
|
cxx{*}: extension = cxx
|
||||||
|
|
||||||
|
# The test target for cross-testing (running tests under Wine, etc).
|
||||||
|
#
|
||||||
|
test.target = $cxx.target
|
13
manifest
Normal file
13
manifest
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
: 1
|
||||||
|
name: reproduce
|
||||||
|
version: 0.1.0-a.0.z
|
||||||
|
language: c++
|
||||||
|
summary: reproduce C++ executable
|
||||||
|
license: other: proprietary ; Not free/open source.
|
||||||
|
description-file: README.md
|
||||||
|
url: https://example.org/reproduce
|
||||||
|
email: ryan@helloryan.se
|
||||||
|
#build-error-email: ryan@helloryan.se
|
||||||
|
depends: * build2 >= 0.16.0
|
||||||
|
depends: * bpkg >= 0.16.0
|
||||||
|
#depends: libhello ^1.0.0
|
11
repositories.manifest
Normal file
11
repositories.manifest
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
: 1
|
||||||
|
summary: reproduce project repository
|
||||||
|
|
||||||
|
#:
|
||||||
|
#role: prerequisite
|
||||||
|
#location: https://pkg.cppget.org/1/stable
|
||||||
|
#trust: ...
|
||||||
|
|
||||||
|
#:
|
||||||
|
#role: prerequisite
|
||||||
|
#location: https://git.build2.org/hello/libhello.git
|
5
reproduce/.gitignore
vendored
Normal file
5
reproduce/.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
reproduce
|
||||||
|
|
||||||
|
# Testscript output directory (can be symlink).
|
||||||
|
#
|
||||||
|
test-reproduce
|
29
reproduce/buildfile
Normal file
29
reproduce/buildfile
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
libs =
|
||||||
|
#import libs += libhello%lib{hello}
|
||||||
|
|
||||||
|
exe{reproduce}: {hxx ixx txx cxx}{**} $libs testscript
|
||||||
|
|
||||||
|
for f: file{public-html/**.css... public-html/**.html...}
|
||||||
|
{
|
||||||
|
n = $name($f)
|
||||||
|
e = $extension($f)
|
||||||
|
d = $directory($f)
|
||||||
|
t = $process.run(file -b --mime-type $d/$n.$e)
|
||||||
|
|
||||||
|
exe{reproduce}: $d/cxx{$n}
|
||||||
|
|
||||||
|
$d/cxx{$n}: $f
|
||||||
|
{{
|
||||||
|
i = $path($<[0])
|
||||||
|
o = $path($>[0])
|
||||||
|
|
||||||
|
diag xxd ($<[0])
|
||||||
|
|
||||||
|
echo "namespace {" > $o
|
||||||
|
echo "char const* type = \"$t\";" >> $o
|
||||||
|
xxd -i -name content "$i" >> $o
|
||||||
|
echo "}" >> $o
|
||||||
|
}}
|
||||||
|
}
|
||||||
|
|
||||||
|
cxx.poptions =+ "-I$out_root" "-I$src_root"
|
3
reproduce/public-html/index.html
Normal file
3
reproduce/public-html/index.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
</html>
|
1
reproduce/public-html/styles.css
Normal file
1
reproduce/public-html/styles.css
Normal file
@ -0,0 +1 @@
|
|||||||
|
style
|
14
reproduce/reproduce.cxx
Normal file
14
reproduce/reproduce.cxx
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
int main (int argc, char* argv[])
|
||||||
|
{
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
if (argc < 2)
|
||||||
|
{
|
||||||
|
cerr << "error: missing name" << endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
cout << "Hello, " << argv[1] << '!' << endl;
|
||||||
|
}
|
9
reproduce/testscript
Normal file
9
reproduce/testscript
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
: basics
|
||||||
|
:
|
||||||
|
$* 'World' >'Hello, World!'
|
||||||
|
|
||||||
|
: missing-name
|
||||||
|
:
|
||||||
|
$* 2>>EOE != 0
|
||||||
|
error: missing name
|
||||||
|
EOE
|
Loading…
Reference in New Issue
Block a user