Skip to content

Commit

Permalink
Split autotools and meson
Browse files Browse the repository at this point in the history
autotools is not really autotools but covers arbitrary legacy
build systems using make. It's not safe to touch arguments
there. This also reverts tests to what they were.
  • Loading branch information
nanonyme authored and TingPing committed Jul 5, 2024
1 parent 61e3a2e commit 21b1fbb
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
8 changes: 7 additions & 1 deletion src/builder-module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1797,14 +1797,20 @@ builder_module_build_helper (BuilderModule *self,
g_ptr_array_add (configure_args_arr, g_strdup_printf ("PREFIX='%s'", prefix));
/* TODO: What parameter for qmake? */
}
else /* autotools and meson */
else if (meson)
{
g_ptr_array_add (configure_args_arr, g_strdup_printf ("--prefix=%s", prefix));
if (libdir)
g_ptr_array_add (configure_args_arr, g_strdup_printf ("--libdir=%s", libdir));
else
g_ptr_array_add (configure_args_arr, g_strdup_printf ("--libdir=%s/lib", prefix));
}
else /* autotools */
{
g_ptr_array_add (configure_args_arr, g_strdup_printf ("--prefix=%s", prefix));
if (libdir)
g_ptr_array_add (configure_args_arr, g_strdup_printf ("--libdir=%s", libdir));
}

g_ptr_array_add (configure_args_arr, configure_final_arg);
g_ptr_array_add (configure_args_arr, NULL);
Expand Down
3 changes: 1 addition & 2 deletions tests/test-configure
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/sh

if [ x$3 != 'x--some-arg' ] ; then
echo $*
if [ x$2 != 'x--some-arg' ] ; then
exit 2
fi

Expand Down
2 changes: 1 addition & 1 deletion tests/test-rename-appdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"type": "file",
"path": "test-configure",
"dest-filename": "configure",
"sha256": "2c661bff6567f0e26e3a4bc5548f5a81ff86e052ccaa3791b847201be84f932f"
"sha256": "675a1ac2feec4d4f54e581b4b01bc3cfd2c1cf31aa5963574d31228c8a11b7e7"
},
{
"type": "file",
Expand Down
2 changes: 1 addition & 1 deletion tests/test-rename.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"type": "file",
"path": "test-configure",
"dest-filename": "configure",
"sha256": "2c661bff6567f0e26e3a4bc5548f5a81ff86e052ccaa3791b847201be84f932f"
"sha256": "675a1ac2feec4d4f54e581b4b01bc3cfd2c1cf31aa5963574d31228c8a11b7e7"
},
{
"type": "file",
Expand Down
2 changes: 1 addition & 1 deletion tests/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"type": "file",
"path": "test-configure",
"dest-filename": "configure",
"sha256": "2c661bff6567f0e26e3a4bc5548f5a81ff86e052ccaa3791b847201be84f932f"
"sha256": "675a1ac2feec4d4f54e581b4b01bc3cfd2c1cf31aa5963574d31228c8a11b7e7"
},
{
"type": "file",
Expand Down
2 changes: 1 addition & 1 deletion tests/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ modules:
- type: file
path: test-configure
dest-filename: configure
sha256: 2c661bff6567f0e26e3a4bc5548f5a81ff86e052ccaa3791b847201be84f932f
sha256: 675a1ac2feec4d4f54e581b4b01bc3cfd2c1cf31aa5963574d31228c8a11b7e7
- type: file
path: app-data
- type: script
Expand Down

0 comments on commit 21b1fbb

Please sign in to comment.