Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ion
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redox-os
ion
Commits
115c2ac6
Commit
115c2ac6
authored
6 years ago
by
Michael Aaron Murphy
Browse files
Options
Downloads
Patches
Plain Diff
System Allocator & Makefile Vendoring Improvements
parent
e4b1c355
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
Cargo.lock
+1
-12
1 addition, 12 deletions
Cargo.lock
Cargo.toml
+1
-0
1 addition, 0 deletions
Cargo.toml
Makefile
+19
-17
19 additions, 17 deletions
Makefile
src/main.rs
+4
-0
4 additions, 0 deletions
src/main.rs
vendor_config
+5
-0
5 additions, 0 deletions
vendor_config
with
30 additions
and
29 deletions
Cargo.lock
+
1
−
12
View file @
115c2ac6
...
...
@@ -20,7 +20,7 @@ version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"termion 1.5.1 (
registry
+https://git
hub.com/rust-lang/crates.io-index
)",
"termion 1.5.1 (
git
+https://git
lab.redox-os.org/redox-os/termion
)",
"winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
...
...
@@ -435,16 +435,6 @@ dependencies = [
"redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "termion"
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (git+https://gitlab.redox-os.org/redox-os/syscall.git?branch=relibc)",
"redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "textwrap"
version = "0.10.0"
...
...
@@ -589,7 +579,6 @@ source = "git+https://github.com/whitequark/rust-xdg#090afef2509d746e48d6bfa9b2e
"checksum syn 0.15.17 (registry+https://github.com/rust-lang/crates.io-index)" = "3391038ebc3e4ab24eb028cb0ef2f2dc4ba0cbf72ee895ed6a6fad730640b5bc"
"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
"checksum termion 1.5.1 (git+https://gitlab.redox-os.org/redox-os/termion)" = "<none>"
"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
"checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6"
"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
"checksum ucd-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d0f8bfa9ff0cadcd210129ad9d2c5f145c13e9ced3d3e5d948a6213487d52444"
...
...
This diff is collapsed.
Click to expand it.
Cargo.toml
+
1
−
0
View file @
115c2ac6
...
...
@@ -62,5 +62,6 @@ lto = true
panic
=
"abort"
[patch.crates-io]
termion
=
{
git
=
"https://gitlab.redox-os.org/redox-os/termion"
}
liner
=
{
git
=
"https://gitlab.redox-os.org/redox-os/liner"
}
redox_syscall
=
{
git
=
"https://gitlab.redox-os.org/redox-os/syscall.git"
,
branch
=
"relibc"
}
This diff is collapsed.
Click to expand it.
Makefile
+
19
−
17
View file @
115c2ac6
...
...
@@ -2,8 +2,9 @@ prefix ?= usr/local
BINARY
=
$(
prefix
)
/bin/ion
RELEASE
=
debug
DEBUG
?=
0
VENDORED
=
0
ifeq
(0,
$(DEBUG))
ifeq
(0,$(DEBUG))
ARGS
+=
--release
RELEASE
=
release
endif
...
...
@@ -12,16 +13,15 @@ ifeq (1,$(REDOX))
ARGS
+=
--target
x86_64-unknown-redox
endif
ifneq
($(wildcard vendor.tar.xz),)
VENDORED
=
1
ARGSV
+=
--frozen
endif
.PHONY
:
all clean distclean install uninstall
all
:
.cargo/config
if
[
-f
vendor.tar.xz
]
;
\
then
\
tar
pxf vendor.tar.xz
;
\
cargo build
$(
ARGS
)
--frozen
;
\
else
\
cargo build
$(
ARGS
);
\
fi
all
:
extract .cargo/config
cargo build
$(
ARGS
)
$(
ARGSV
)
clean
:
cargo clean
...
...
@@ -30,12 +30,11 @@ distclean:
rm
-rf
vendor vendor.tar.xz .cargo
tests
:
cargo
test
--manifest-path
members/braces/Cargo.toml
cargo
test
--manifest-path
members/builtins/Cargo.toml
cargo
test
--manifest-path
members/lexers/Cargo.toml
cargo
test
--manifest-path
members/ranges/Cargo.toml
cargo
test
cargo
test
$(
ARGSV
)
bash examples/run_examples.sh
for
crate
in
members/
*
;
do
\
cargo
test
$(
ARGSV
)
--manifest-path
$$
crate/Cargo.toml
;
\
done
install
:
install
-Dm0755
target/
$(
RELEASE
)
/ion
$(
DESTDIR
)
/
$(
BINARY
)
...
...
@@ -58,14 +57,17 @@ vendor.tar.xz:
vendor
:
.cargo/config vendor.tar.xz
extract
:
ifeq
(1,$(VENDORED)$(wildcard vendor))
tar
pxf vendor.tar.xz
endif
update-shells
:
if
!
grep
ion /etc/shells
>
/dev/null
;
then
\
echo
$(
BINARY
)
>>
/etc/shells
;
\
else
\
shell
=
$(
shell
grep
ion /etc/shells
);
\
if
[
$$
shell
!=
$(
BINARY
)
]
;
then
\
before
=
$$(
echo
$$
shell |
sed
's/\//\\\//g'
);
\
after
=
$$(
echo
$(
BINARY
)
|
sed
's/\//\\\//g'
);
\
sed
-i
-e
"s/
$$
before/
$$
after/g"
/etc/shells
;
\
sed
-i
-e
"s#
$$
shell#
$(
BINARY
)
#g"
/etc/shells
;
\
fi
\
fi
This diff is collapsed.
Click to expand it.
src/main.rs
+
4
−
0
View file @
115c2ac6
...
...
@@ -5,12 +5,16 @@ extern crate smallvec;
use
ion_shell
::{
flags
::
NO_EXEC
,
Binary
,
JobControl
,
ShellBuilder
,
MAN_ION
};
use
smallvec
::
SmallVec
;
use
std
::{
alloc
::
System
,
env
,
error
::
Error
,
io
::{
stdin
,
stdout
,
BufRead
,
BufReader
,
Write
},
iter
::
FromIterator
,
};
#[global_allocator]
static
A
:
System
=
System
;
fn
main
()
{
let
stdin_is_a_tty
=
sys
::
isatty
(
sys
::
STDIN_FILENO
);
let
mut
shell
=
ShellBuilder
::
new
()
.install_signal_handler
()
.block_signals
();
...
...
This diff is collapsed.
Click to expand it.
vendor_config
+
5
−
0
View file @
115c2ac6
...
...
@@ -24,5 +24,10 @@ git = "https://gitlab.redox-os.org/redox-os/syscall.git"
branch = "relibc"
replace-with = "vendored-sources"
[source."https://gitlab.redox-os.org/redox-os/termion"]
git = "https://gitlab.redox-os.org/redox-os/termion"
branch = "master"
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment