Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
apk-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
59
Issues
59
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
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
alpine
apk-tools
Commits
12fdf6fc
Commit
12fdf6fc
authored
May 19, 2020
by
Timo Teräs
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow building without help when lua interpreter is not available
fixes
#10696
parent
5e251b21
Pipeline
#18608
passed with stage
in 42 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
src/Makefile
src/Makefile
+15
-5
src/help.c
src/help.c
+6
-1
No files found.
src/Makefile
View file @
12fdf6fc
PKG_CONFIG
?=
pkg-config
LUAAPK
?=
yes
PKG_CONFIG
?=
pkg-config
LUA
?=
$(
firstword
$(
wildcard
/usr/bin/lua5.3 /usr/bin/lua5.2
))
ifeq
($(LUA),no)
LUAAPK
?=
no
else
ifneq
($(LUA),)
LUAAPK
?=
yes
else
$(error
Lua
interpreter
not
found.
Please
specify
LUA
interpreter,
or
use
LUA
=
no to build without help.
)
endif
OPENSSL_CFLAGS
:=
$(
shell
$(PKG_CONFIG)
--cflags
openssl
)
OPENSSL_LIBS
:=
$(
shell
$(PKG_CONFIG)
--libs
openssl
)
...
...
@@ -86,10 +92,14 @@ LIBS := -Wl,--as-needed \
# Help generation
quiet_cmd_genhelp
=
GENHELP
$@
ifneq
($(LUA),no)
cmd_genhelp
=
$(LUA)
$(src)
/genhelp.lua
$(
filter
%.scd,
$^
)
>
$@
else
cmd_genhelp
=
echo
\\\#
define NO_HELP
>
$@
endif
$(obj)/help.h
:
$(src)/genhelp.lua $(wildcard doc/apk*.8.scd)
@
$(
call
echo-cmd,genhelp
)
$(cmd_
genhelp)
$(obj)/help.h
:
$(src)/genhelp.lua $(wildcard doc/apk*.8.scd)
FORCE
$(
call
if_changed,
genhelp
)
CFLAGS_help.o
:=
-I
$(obj)
...
...
src/help.c
View file @
12fdf6fc
...
...
@@ -10,7 +10,7 @@
#include "apk_applet.h"
#include "apk_print.h"
static
int
is_group
(
struct
apk_applet
*
applet
,
const
char
*
topic
)
static
in
line
in
t
is_group
(
struct
apk_applet
*
applet
,
const
char
*
topic
)
{
if
(
!
applet
)
return
strcasecmp
(
topic
,
"apk"
)
==
0
;
if
(
strcasecmp
(
topic
,
applet
->
name
)
==
0
)
return
1
;
...
...
@@ -23,6 +23,7 @@ void apk_help(struct apk_applet *applet)
{
#include "help.h"
#ifndef NO_HELP
char
buf
[
uncompressed_help_size
],
*
ptr
,
*
msg
;
unsigned
long
len
=
sizeof
buf
;
int
num
=
0
;
...
...
@@ -38,4 +39,8 @@ void apk_help(struct apk_applet *applet)
}
}
if
(
num
==
0
)
apk_error
(
"Help not found"
);
#else
fputc
(
'\n'
,
stdout
);
apk_error
(
"This apk-tools has been built without help"
);
#endif
}
Timo Teräs
@fabled
mentioned in commit
4d69d123
·
May 19, 2020
mentioned in commit
4d69d123
mentioned in commit 4d69d123f595994380c3ed4a5906982b022ecde8
Toggle commit list
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