Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
binary_c-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Izzard, Robert Dr (Maths & Physics)
binary_c-python
Commits
af403570
Commit
af403570
authored
5 years ago
by
Izzard, Robert Dr (Maths & Physics)
Browse files
Options
Downloads
Patches
Plain Diff
more changes to try to build data objects with meson
parent
6543ddee
No related branches found
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
meson.build
+4
-5
4 additions, 5 deletions
meson.build
meson/make_data_object.sh
+15
-8
15 additions, 8 deletions
meson/make_data_object.sh
with
19 additions
and
13 deletions
meson.build
+
4
−
5
View file @
af403570
...
@@ -873,14 +873,12 @@ if 1 == 1
...
@@ -873,14 +873,12 @@ if 1 == 1
else
else
# get data objects source (.h) files
data_object_sourcefiles
=
run_command
(
'meson/data_object_list_files.sh'
)
data_object_sourcefiles
=
run_command
(
'meson/data_object_list_files.sh'
)
if
data_object_sourcefiles
.
returncode
()
!=
0
if
data_object_sourcefiles
.
returncode
()
!=
0
error
(
'There was a problem identifying the data object source file.'
)
error
(
'There was a problem identifying the data object source file.'
)
endif
endif
data_objects_source
=
data_object_sourcefiles
.
stdout
().
strip
().
split
(
' '
)
# get data objects source (.h) files
data_objects_source
=
run_command
(
'meson/data_object_list_files.sh'
).
stdout
().
strip
().
split
(
' '
)
# list data objects (.o) files
# list data objects (.o) files
data_objects_files
=
run_command
(
'meson/make_data_object.sh'
,
data_objects_files
=
run_command
(
'meson/make_data_object.sh'
,
...
@@ -894,11 +892,12 @@ else
...
@@ -894,11 +892,12 @@ else
data_objects_source
,
data_objects_source
,
],
],
command
:
[
command
:
[
'meson/make_data_object.sh'
,
'
../
meson/make_data_object.sh'
,
'build'
,
'build'
,
'@INPUT@'
,
'@INPUT@'
,
],
],
output
:
[
output
:
[
'pants'
],
],
)
)
...
...
This diff is collapsed.
Click to expand it.
meson/make_data_object.sh
+
15
−
8
View file @
af403570
...
@@ -17,22 +17,28 @@ DBUILT="false"
...
@@ -17,22 +17,28 @@ DBUILT="false"
COMMAND
=
$1
COMMAND
=
$1
shift
shift
SRCPREFIX
=
".."
for
HFILE
in
"
$@
"
;
do
for
HFILE
in
"
$@
"
;
do
TMPFILE
=
$(
printf
"%s"
"
$HFILE
"
|
sed
s/
\.
h
$/
.tmp/
)
TMPFILE
=
$(
printf
"%s"
"
$HFILE
"
|
sed
s/
\.
h
$/
.tmp/
|
sed
s/
\\
//_/g
)
OBJFILE
=
$(
printf
"%s/%s"
"
${
MESON_BUILD_ROOT
}
"
"
$HFILE
"
|
sed
s/
\.
h
$/
.o/ |
sed
s/
\\
//_/g
)
OBJFILE
=
$(
printf
"%s/%s"
"
${
MESON_BUILD_ROOT
}
"
"
$HFILE
"
|
sed
s/
\.
h
$/
.o/ |
sed
s/
\\
//_/g
)
#echo "H $HFILE"
echo
"H
$HFILE
"
#echo "T $TMPFILE"
ls
-l
$SRCPREFIX
/
$HFILE
#echo "O $OBJFILE"
echo
"T
$TMPFILE
"
echo
"O
$OBJFILE
"
if
[
"
$COMMAND
"
=
"build"
]
;
then
if
[
"
$COMMAND
"
=
"build"
]
;
then
if
[
"
$HFILE
"
-nt
"
$OBJFILE
"
]
;
then
echo
"Do build"
if
[
"
$SRCPREFIX
/
$HFILE
"
-nt
"
$OBJFILE
"
]
;
then
echo
"Require objfile (
$DBUILT
)"
if
[
"
$DBUILT
"
=
true
]
;
then
if
[
"
$DBUILT
"
=
true
]
;
then
echo
"Build double2bin"
# first time, build double2bin
# first time, build double2bin
$CC
double2bin.c
-o
./double2bin
$CC
../
double2bin.c
-o
./double2bin
fi
fi
tr
,
' '
<
"
$HFILE
"
|
sed
s/
\\\\
// |
grep
-v
define |grep
-v
"
\\
*"
| ./double2bin
>
"
$TMPFILE
"
tr
,
' '
<
"
$
SRCPREFIX
/
$
HFILE
"
|
sed
s/
\\\\
// |
grep
-v
define |grep
-v
"
\\
*"
| ./double2bin
>
"
$TMPFILE
"
objcopy
$OBJCOPY_OPTS
$OBJCOPY_SUBOPTS
"
$TMPFILE
"
"
$OBJFILE
"
objcopy
$OBJCOPY_OPTS
$OBJCOPY_SUBOPTS
"
$TMPFILE
"
"
$OBJFILE
"
rm
"
$TMPFILE
"
rm
"
$TMPFILE
"
DBUILT
=
true
DBUILT
=
true
...
@@ -42,6 +48,7 @@ for HFILE in "$@"; do
...
@@ -42,6 +48,7 @@ for HFILE in "$@"; do
echo
-n
"
$OBJFILE
"
echo
-n
"
$OBJFILE
"
#ls -l $OBJFILE
#ls -l $OBJFILE
#echo
#echo
done
done
echo
echo
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