Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
metadata-collect-agent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
metadata-collect-agent
Commits
60fb5186
Commit
60fb5186
authored
Jan 31, 2022
by
Ophélie Gagnard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve cython's Makefile. Remove useless files.
parent
5fc7f057
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
1014 deletions
+5
-1014
scan-filesystem/cython/Makefile
scan-filesystem/cython/Makefile
+5
-20
scan-filesystem/cython/command-line.main.pyx
scan-filesystem/cython/command-line.main.pyx
+0
-333
scan-filesystem/cython/new.uefi.main.pyx
scan-filesystem/cython/new.uefi.main.pyx
+0
-333
scan-filesystem/cython/uefi.main.pyx
scan-filesystem/cython/uefi.main.pyx
+0
-328
No files found.
scan-filesystem/cython/Makefile
View file @
60fb5186
ifeq
(,)
INCLUDE_
DIRS
=
-I
/usr/include/python3.7
INCLUDE_
PYTHON
=
$(
shell
pkg-config
--cflags
python3 |
cut
-f
1
-d
" "
)
else
...
...
@@ -34,25 +34,14 @@ LDLIBS = -lcrypto -lfmt
EXT_SUFFIX
:=
$(
shell
python3
-c
"import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'
))
"
)
EXT
=
$(EXE)$(EXT_SUFFIX)
# Build with Python runtime
all
:
$(EXT)
$(EXT)
:
setup.py
@
echo
"[Cython Compiling
$^
->
$@
]"
python3 setup.py build_ext
--inplace
# Run with Python runtime
run
:
$(EXT)
python3
-c
"import
$(EXE)
;
$(EXE)
.python_main()"
2>/dev/null
# Build without Python runtime
nopython
:
main.cpp
#
$(EXE)
all
:
main.cpp
#
$(EXE)
mkdir
-p
logs
# Error expected here, writing a C program using the error messages
-
g++
-O2
-g
-Wno-unused-result
-Wsign-compare
-pthread
-I
/opt/python-3.7.12/include/python3.7m/
main.cpp
-lcrypto
-lfmt
-o
main 2> logs/link_errors
-
g++
-O2
-g
-Wno-unused-result
-Wsign-compare
-pthread
$(INCLUDE_PYTHON)
main.cpp
-lcrypto
-lfmt
-o
main 2> logs/link_errors
./parse_link_errors.py < logs/link_errors
make fake_python.o
g++
-O2
-g
-Wno-unused-result
-Wsign-compare
-pthread
-I
/opt/python-3.7.12/include/python3.7m/
main.cpp fake_python.o
-lcrypto
-lfmt
-o
metadata-collect-agent
g++
-O2
-g
-Wno-unused-result
-Wsign-compare
-pthread
$(INCLUDE_PYTHON)
main.cpp fake_python.o
-lcrypto
-lfmt
-o
metadata-collect-agent
#-ln -f ../../metadata-collect-agent metadata-collect-agent
-
ln
-f
metadata-collect-agent ../../dracut.module/90metadata-collect/metadata-collect-agent
#-ln -f metadata-collect-agent ../../debian.package.unsafe/unsafe-boot-metadata-collect-agent/sbin/metadata-collect-agent
...
...
@@ -66,10 +55,6 @@ nopython: main.cpp#$(EXE)
@
echo
"[C++ Compiling
$^
->
$@
]"
$(LINK.cpp)
$^
$(LOADLIBES)
$(LDLIBS)
-o
$@
# Run without Python runtime
runnopython
:
$(EXE)
./
$(EXE)
2>/dev/null
clean
:
-
rm
-f
*
.c
*
.cpp
*
.html
-
rm
-f
*
.h
...
...
@@ -84,5 +69,5 @@ clean:
-
rm
-f
../../debian.package.unsafe/unsafe-boot-metadata-collect-agent/sbin/metadata-collect-agent
-
rm
-rf
logs
.PHONY
:
all
run nopython runnopython
clean
.PHONY
:
all clean
.PRECIOUS
:
%.cpp
scan-filesystem/cython/command-line.main.pyx
deleted
100644 → 0
View file @
5fc7f057
This diff is collapsed.
Click to expand it.
scan-filesystem/cython/new.uefi.main.pyx
deleted
100644 → 0
View file @
5fc7f057
This diff is collapsed.
Click to expand it.
scan-filesystem/cython/uefi.main.pyx
deleted
100644 → 0
View file @
5fc7f057
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment