meson: Fix build with 0.57.1

Meson doesn't like that we are symlinking subprojects outside the
subproject directory. If we invert the links we are able to build again.

We also need to fix any projects passing arguments which they don't
actually accept.

Change-Id: Ie7adf82afabc1becc85c36b3cc632e8ebd4cae5b
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/.clang-ignore b/.clang-ignore
index 5b7b6ae..6e40ecf 100644
--- a/.clang-ignore
+++ b/.clang-ignore
@@ -1 +1 @@
-./ncsid/src/platforms
+./subprojects/ncsid/src/platforms
diff --git a/.gitignore b/.gitignore
index 499916c..90752d7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
 /**/build*/
 /**/subprojects/*/
+!/**/subprojects/acpi-power-state-daemon/
+!/**/subprojects/metrics-ipmi-blobs/
+!/**/subprojects/ncsid/
 /**/subprojects/*.wrap
diff --git a/acpi-power-state-daemon b/acpi-power-state-daemon
new file mode 120000
index 0000000..4c151d1
--- /dev/null
+++ b/acpi-power-state-daemon
@@ -0,0 +1 @@
+subprojects/acpi-power-state-daemon
\ No newline at end of file
diff --git a/acpi-power-state-daemon/subprojects b/acpi-power-state-daemon/subprojects
deleted file mode 120000
index d2458e9..0000000
--- a/acpi-power-state-daemon/subprojects
+++ /dev/null
@@ -1 +0,0 @@
-../subprojects/
\ No newline at end of file
diff --git a/meson.build b/meson.build
index b3f907f..df87700 100644
--- a/meson.build
+++ b/meson.build
@@ -34,6 +34,6 @@
   tests_str = 'auto'
 endif
 
-subproject('acpi-power-state-daemon', default_options: 'tests=' + tests_str)
+subproject('acpi-power-state-daemon')
 subproject('ncsid', default_options: 'tests=' + tests_str)
 subproject('metrics-ipmi-blobs', default_options: 'tests=' + tests_str)
diff --git a/metrics-ipmi-blobs b/metrics-ipmi-blobs
new file mode 120000
index 0000000..9d5b724
--- /dev/null
+++ b/metrics-ipmi-blobs
@@ -0,0 +1 @@
+subprojects/metrics-ipmi-blobs
\ No newline at end of file
diff --git a/metrics-ipmi-blobs/subprojects b/metrics-ipmi-blobs/subprojects
deleted file mode 120000
index 15858bc..0000000
--- a/metrics-ipmi-blobs/subprojects
+++ /dev/null
@@ -1 +0,0 @@
-../subprojects
\ No newline at end of file
diff --git a/ncsid b/ncsid
new file mode 120000
index 0000000..f49061d
--- /dev/null
+++ b/ncsid
@@ -0,0 +1 @@
+subprojects/ncsid
\ No newline at end of file
diff --git a/ncsid/subprojects b/ncsid/subprojects
deleted file mode 120000
index d2458e9..0000000
--- a/ncsid/subprojects
+++ /dev/null
@@ -1 +0,0 @@
-../subprojects/
\ No newline at end of file
diff --git a/subprojects/acpi-power-state-daemon b/subprojects/acpi-power-state-daemon
deleted file mode 120000
index dbdf69b..0000000
--- a/subprojects/acpi-power-state-daemon
+++ /dev/null
@@ -1 +0,0 @@
-../acpi-power-state-daemon/
\ No newline at end of file
diff --git a/acpi-power-state-daemon/acpi-power-state.service.in b/subprojects/acpi-power-state-daemon/acpi-power-state.service.in
similarity index 100%
rename from acpi-power-state-daemon/acpi-power-state.service.in
rename to subprojects/acpi-power-state-daemon/acpi-power-state.service.in
diff --git a/acpi-power-state-daemon/acpi_power_state.cpp b/subprojects/acpi-power-state-daemon/acpi_power_state.cpp
similarity index 100%
rename from acpi-power-state-daemon/acpi_power_state.cpp
rename to subprojects/acpi-power-state-daemon/acpi_power_state.cpp
diff --git a/acpi-power-state-daemon/host-s0-state.target b/subprojects/acpi-power-state-daemon/host-s0-state.target
similarity index 100%
rename from acpi-power-state-daemon/host-s0-state.target
rename to subprojects/acpi-power-state-daemon/host-s0-state.target
diff --git a/acpi-power-state-daemon/host-s5-state.target b/subprojects/acpi-power-state-daemon/host-s5-state.target
similarity index 100%
rename from acpi-power-state-daemon/host-s5-state.target
rename to subprojects/acpi-power-state-daemon/host-s5-state.target
diff --git a/acpi-power-state-daemon/meson.build b/subprojects/acpi-power-state-daemon/meson.build
similarity index 100%
rename from acpi-power-state-daemon/meson.build
rename to subprojects/acpi-power-state-daemon/meson.build
diff --git a/subprojects/acpi-power-state-daemon/subprojects b/subprojects/acpi-power-state-daemon/subprojects
new file mode 120000
index 0000000..a96aa0e
--- /dev/null
+++ b/subprojects/acpi-power-state-daemon/subprojects
@@ -0,0 +1 @@
+..
\ No newline at end of file
diff --git a/subprojects/metrics-ipmi-blobs b/subprojects/metrics-ipmi-blobs
deleted file mode 120000
index 360cb5a..0000000
--- a/subprojects/metrics-ipmi-blobs
+++ /dev/null
@@ -1 +0,0 @@
-../metrics-ipmi-blobs
\ No newline at end of file
diff --git a/metrics-ipmi-blobs/README.md b/subprojects/metrics-ipmi-blobs/README.md
similarity index 100%
rename from metrics-ipmi-blobs/README.md
rename to subprojects/metrics-ipmi-blobs/README.md
diff --git a/metrics-ipmi-blobs/handler.cpp b/subprojects/metrics-ipmi-blobs/handler.cpp
similarity index 100%
rename from metrics-ipmi-blobs/handler.cpp
rename to subprojects/metrics-ipmi-blobs/handler.cpp
diff --git a/metrics-ipmi-blobs/handler.hpp b/subprojects/metrics-ipmi-blobs/handler.hpp
similarity index 100%
rename from metrics-ipmi-blobs/handler.hpp
rename to subprojects/metrics-ipmi-blobs/handler.hpp
diff --git a/metrics-ipmi-blobs/main.cpp b/subprojects/metrics-ipmi-blobs/main.cpp
similarity index 100%
rename from metrics-ipmi-blobs/main.cpp
rename to subprojects/metrics-ipmi-blobs/main.cpp
diff --git a/metrics-ipmi-blobs/meson.build b/subprojects/metrics-ipmi-blobs/meson.build
similarity index 100%
rename from metrics-ipmi-blobs/meson.build
rename to subprojects/metrics-ipmi-blobs/meson.build
diff --git a/metrics-ipmi-blobs/meson_options.txt b/subprojects/metrics-ipmi-blobs/meson_options.txt
similarity index 100%
rename from metrics-ipmi-blobs/meson_options.txt
rename to subprojects/metrics-ipmi-blobs/meson_options.txt
diff --git a/metrics-ipmi-blobs/metric.cpp b/subprojects/metrics-ipmi-blobs/metric.cpp
similarity index 100%
rename from metrics-ipmi-blobs/metric.cpp
rename to subprojects/metrics-ipmi-blobs/metric.cpp
diff --git a/metrics-ipmi-blobs/metric.hpp b/subprojects/metrics-ipmi-blobs/metric.hpp
similarity index 100%
rename from metrics-ipmi-blobs/metric.hpp
rename to subprojects/metrics-ipmi-blobs/metric.hpp
diff --git a/metrics-ipmi-blobs/metricblob.proto b/subprojects/metrics-ipmi-blobs/metricblob.proto
similarity index 100%
rename from metrics-ipmi-blobs/metricblob.proto
rename to subprojects/metrics-ipmi-blobs/metricblob.proto
diff --git a/subprojects/metrics-ipmi-blobs/subprojects b/subprojects/metrics-ipmi-blobs/subprojects
new file mode 120000
index 0000000..a96aa0e
--- /dev/null
+++ b/subprojects/metrics-ipmi-blobs/subprojects
@@ -0,0 +1 @@
+..
\ No newline at end of file
diff --git a/metrics-ipmi-blobs/test/meson.build b/subprojects/metrics-ipmi-blobs/test/meson.build
similarity index 100%
rename from metrics-ipmi-blobs/test/meson.build
rename to subprojects/metrics-ipmi-blobs/test/meson.build
diff --git a/metrics-ipmi-blobs/test/util_test.cpp b/subprojects/metrics-ipmi-blobs/test/util_test.cpp
similarity index 100%
rename from metrics-ipmi-blobs/test/util_test.cpp
rename to subprojects/metrics-ipmi-blobs/test/util_test.cpp
diff --git a/metrics-ipmi-blobs/util.cpp b/subprojects/metrics-ipmi-blobs/util.cpp
similarity index 100%
rename from metrics-ipmi-blobs/util.cpp
rename to subprojects/metrics-ipmi-blobs/util.cpp
diff --git a/metrics-ipmi-blobs/util.hpp b/subprojects/metrics-ipmi-blobs/util.hpp
similarity index 100%
rename from metrics-ipmi-blobs/util.hpp
rename to subprojects/metrics-ipmi-blobs/util.hpp
diff --git a/subprojects/ncsid b/subprojects/ncsid
deleted file mode 120000
index 782e463..0000000
--- a/subprojects/ncsid
+++ /dev/null
@@ -1 +0,0 @@
-../ncsid
\ No newline at end of file
diff --git a/ncsid/README.md b/subprojects/ncsid/README.md
similarity index 100%
rename from ncsid/README.md
rename to subprojects/ncsid/README.md
diff --git a/ncsid/doc/ncsid_arch.dot b/subprojects/ncsid/doc/ncsid_arch.dot
similarity index 100%
rename from ncsid/doc/ncsid_arch.dot
rename to subprojects/ncsid/doc/ncsid_arch.dot
diff --git a/ncsid/doc/ncsid_arch.png b/subprojects/ncsid/doc/ncsid_arch.png
similarity index 100%
rename from ncsid/doc/ncsid_arch.png
rename to subprojects/ncsid/doc/ncsid_arch.png
Binary files differ
diff --git a/ncsid/doc/ncsid_internals.md b/subprojects/ncsid/doc/ncsid_internals.md
similarity index 100%
rename from ncsid/doc/ncsid_internals.md
rename to subprojects/ncsid/doc/ncsid_internals.md
diff --git a/ncsid/doc/ncsid_test_arch.dot b/subprojects/ncsid/doc/ncsid_test_arch.dot
similarity index 100%
rename from ncsid/doc/ncsid_test_arch.dot
rename to subprojects/ncsid/doc/ncsid_test_arch.dot
diff --git a/ncsid/doc/ncsid_test_arch.png b/subprojects/ncsid/doc/ncsid_test_arch.png
similarity index 100%
rename from ncsid/doc/ncsid_test_arch.png
rename to subprojects/ncsid/doc/ncsid_test_arch.png
Binary files differ
diff --git a/ncsid/meson.build b/subprojects/ncsid/meson.build
similarity index 100%
rename from ncsid/meson.build
rename to subprojects/ncsid/meson.build
diff --git a/ncsid/meson_options.txt b/subprojects/ncsid/meson_options.txt
similarity index 100%
rename from ncsid/meson_options.txt
rename to subprojects/ncsid/meson_options.txt
diff --git a/ncsid/src/common_defs.h b/subprojects/ncsid/src/common_defs.h
similarity index 100%
rename from ncsid/src/common_defs.h
rename to subprojects/ncsid/src/common_defs.h
diff --git a/ncsid/src/dhcp4@.service.in b/subprojects/ncsid/src/dhcp4@.service.in
similarity index 100%
rename from ncsid/src/dhcp4@.service.in
rename to subprojects/ncsid/src/dhcp4@.service.in
diff --git a/ncsid/src/dhcp6@.service.in b/subprojects/ncsid/src/dhcp6@.service.in
similarity index 100%
rename from ncsid/src/dhcp6@.service.in
rename to subprojects/ncsid/src/dhcp6@.service.in
diff --git a/ncsid/src/meson.build b/subprojects/ncsid/src/meson.build
similarity index 100%
rename from ncsid/src/meson.build
rename to subprojects/ncsid/src/meson.build
diff --git a/ncsid/src/ncsi_sockio.cpp b/subprojects/ncsid/src/ncsi_sockio.cpp
similarity index 100%
rename from ncsid/src/ncsi_sockio.cpp
rename to subprojects/ncsid/src/ncsi_sockio.cpp
diff --git a/ncsid/src/ncsi_sockio.h b/subprojects/ncsid/src/ncsi_sockio.h
similarity index 100%
rename from ncsid/src/ncsi_sockio.h
rename to subprojects/ncsid/src/ncsi_sockio.h
diff --git a/ncsid/src/ncsi_state_machine.cpp b/subprojects/ncsid/src/ncsi_state_machine.cpp
similarity index 100%
rename from ncsid/src/ncsi_state_machine.cpp
rename to subprojects/ncsid/src/ncsi_state_machine.cpp
diff --git a/ncsid/src/ncsi_state_machine.h b/subprojects/ncsid/src/ncsi_state_machine.h
similarity index 100%
rename from ncsid/src/ncsi_state_machine.h
rename to subprojects/ncsid/src/ncsi_state_machine.h
diff --git a/ncsid/src/ncsid.cpp b/subprojects/ncsid/src/ncsid.cpp
similarity index 100%
rename from ncsid/src/ncsid.cpp
rename to subprojects/ncsid/src/ncsid.cpp
diff --git a/ncsid/src/ncsid@.service.in b/subprojects/ncsid/src/ncsid@.service.in
similarity index 100%
rename from ncsid/src/ncsid@.service.in
rename to subprojects/ncsid/src/ncsid@.service.in
diff --git a/ncsid/src/ncsid_lib.sh b/subprojects/ncsid/src/ncsid_lib.sh
similarity index 100%
rename from ncsid/src/ncsid_lib.sh
rename to subprojects/ncsid/src/ncsid_lib.sh
diff --git a/ncsid/src/ncsid_udhcpc4.script b/subprojects/ncsid/src/ncsid_udhcpc4.script
similarity index 100%
rename from ncsid/src/ncsid_udhcpc4.script
rename to subprojects/ncsid/src/ncsid_udhcpc4.script
diff --git a/ncsid/src/ncsid_udhcpc6.script b/subprojects/ncsid/src/ncsid_udhcpc6.script
similarity index 100%
rename from ncsid/src/ncsid_udhcpc6.script
rename to subprojects/ncsid/src/ncsid_udhcpc6.script
diff --git a/ncsid/src/net_config.cpp b/subprojects/ncsid/src/net_config.cpp
similarity index 100%
rename from ncsid/src/net_config.cpp
rename to subprojects/ncsid/src/net_config.cpp
diff --git a/ncsid/src/net_config.h b/subprojects/ncsid/src/net_config.h
similarity index 100%
rename from ncsid/src/net_config.h
rename to subprojects/ncsid/src/net_config.h
diff --git a/ncsid/src/net_iface.cpp b/subprojects/ncsid/src/net_iface.cpp
similarity index 100%
rename from ncsid/src/net_iface.cpp
rename to subprojects/ncsid/src/net_iface.cpp
diff --git a/ncsid/src/net_iface.h b/subprojects/ncsid/src/net_iface.h
similarity index 100%
rename from ncsid/src/net_iface.h
rename to subprojects/ncsid/src/net_iface.h
diff --git a/ncsid/src/net_sockio.cpp b/subprojects/ncsid/src/net_sockio.cpp
similarity index 100%
rename from ncsid/src/net_sockio.cpp
rename to subprojects/ncsid/src/net_sockio.cpp
diff --git a/ncsid/src/net_sockio.h b/subprojects/ncsid/src/net_sockio.h
similarity index 100%
rename from ncsid/src/net_sockio.h
rename to subprojects/ncsid/src/net_sockio.h
diff --git a/ncsid/src/nic-hostful@.target b/subprojects/ncsid/src/nic-hostful@.target
similarity index 100%
rename from ncsid/src/nic-hostful@.target
rename to subprojects/ncsid/src/nic-hostful@.target
diff --git a/ncsid/src/nic-hostless@.target b/subprojects/ncsid/src/nic-hostless@.target
similarity index 100%
rename from ncsid/src/nic-hostless@.target
rename to subprojects/ncsid/src/nic-hostless@.target
diff --git a/ncsid/src/normalize_ip.c b/subprojects/ncsid/src/normalize_ip.c
similarity index 100%
rename from ncsid/src/normalize_ip.c
rename to subprojects/ncsid/src/normalize_ip.c
diff --git a/ncsid/src/normalize_mac.c b/subprojects/ncsid/src/normalize_mac.c
similarity index 100%
rename from ncsid/src/normalize_mac.c
rename to subprojects/ncsid/src/normalize_mac.c
diff --git a/ncsid/src/platforms/nemora/portable/default_addresses.h b/subprojects/ncsid/src/platforms/nemora/portable/default_addresses.h
similarity index 100%
rename from ncsid/src/platforms/nemora/portable/default_addresses.h
rename to subprojects/ncsid/src/platforms/nemora/portable/default_addresses.h
diff --git a/ncsid/src/platforms/nemora/portable/ncsi.h b/subprojects/ncsid/src/platforms/nemora/portable/ncsi.h
similarity index 100%
rename from ncsid/src/platforms/nemora/portable/ncsi.h
rename to subprojects/ncsid/src/platforms/nemora/portable/ncsi.h
diff --git a/ncsid/src/platforms/nemora/portable/ncsi_client.c b/subprojects/ncsid/src/platforms/nemora/portable/ncsi_client.c
similarity index 100%
rename from ncsid/src/platforms/nemora/portable/ncsi_client.c
rename to subprojects/ncsid/src/platforms/nemora/portable/ncsi_client.c
diff --git a/ncsid/src/platforms/nemora/portable/ncsi_client.h b/subprojects/ncsid/src/platforms/nemora/portable/ncsi_client.h
similarity index 100%
rename from ncsid/src/platforms/nemora/portable/ncsi_client.h
rename to subprojects/ncsid/src/platforms/nemora/portable/ncsi_client.h
diff --git a/ncsid/src/platforms/nemora/portable/ncsi_fsm.c b/subprojects/ncsid/src/platforms/nemora/portable/ncsi_fsm.c
similarity index 100%
rename from ncsid/src/platforms/nemora/portable/ncsi_fsm.c
rename to subprojects/ncsid/src/platforms/nemora/portable/ncsi_fsm.c
diff --git a/ncsid/src/platforms/nemora/portable/ncsi_fsm.h b/subprojects/ncsid/src/platforms/nemora/portable/ncsi_fsm.h
similarity index 100%
rename from ncsid/src/platforms/nemora/portable/ncsi_fsm.h
rename to subprojects/ncsid/src/platforms/nemora/portable/ncsi_fsm.h
diff --git a/ncsid/src/platforms/nemora/portable/ncsi_server.c b/subprojects/ncsid/src/platforms/nemora/portable/ncsi_server.c
similarity index 100%
rename from ncsid/src/platforms/nemora/portable/ncsi_server.c
rename to subprojects/ncsid/src/platforms/nemora/portable/ncsi_server.c
diff --git a/ncsid/src/platforms/nemora/portable/ncsi_server.h b/subprojects/ncsid/src/platforms/nemora/portable/ncsi_server.h
similarity index 100%
rename from ncsid/src/platforms/nemora/portable/ncsi_server.h
rename to subprojects/ncsid/src/platforms/nemora/portable/ncsi_server.h
diff --git a/ncsid/src/platforms/nemora/portable/net_types.h b/subprojects/ncsid/src/platforms/nemora/portable/net_types.h
similarity index 100%
rename from ncsid/src/platforms/nemora/portable/net_types.h
rename to subprojects/ncsid/src/platforms/nemora/portable/net_types.h
diff --git a/ncsid/src/update-static-neighbors@.service.in b/subprojects/ncsid/src/update-static-neighbors@.service.in
similarity index 100%
rename from ncsid/src/update-static-neighbors@.service.in
rename to subprojects/ncsid/src/update-static-neighbors@.service.in
diff --git a/ncsid/src/update-static-neighbors@.timer b/subprojects/ncsid/src/update-static-neighbors@.timer
similarity index 100%
rename from ncsid/src/update-static-neighbors@.timer
rename to subprojects/ncsid/src/update-static-neighbors@.timer
diff --git a/ncsid/src/update_static_neighbors.sh b/subprojects/ncsid/src/update_static_neighbors.sh
similarity index 100%
rename from ncsid/src/update_static_neighbors.sh
rename to subprojects/ncsid/src/update_static_neighbors.sh
diff --git a/subprojects/ncsid/subprojects b/subprojects/ncsid/subprojects
new file mode 120000
index 0000000..a96aa0e
--- /dev/null
+++ b/subprojects/ncsid/subprojects
@@ -0,0 +1 @@
+..
\ No newline at end of file
diff --git a/ncsid/test/iface_test.cpp b/subprojects/ncsid/test/iface_test.cpp
similarity index 100%
rename from ncsid/test/iface_test.cpp
rename to subprojects/ncsid/test/iface_test.cpp
diff --git a/ncsid/test/meson.build b/subprojects/ncsid/test/meson.build
similarity index 100%
rename from ncsid/test/meson.build
rename to subprojects/ncsid/test/meson.build
diff --git a/ncsid/test/ncsi_test.cpp b/subprojects/ncsid/test/ncsi_test.cpp
similarity index 100%
rename from ncsid/test/ncsi_test.cpp
rename to subprojects/ncsid/test/ncsi_test.cpp
diff --git a/ncsid/test/net_iface_mock.cpp b/subprojects/ncsid/test/net_iface_mock.cpp
similarity index 100%
rename from ncsid/test/net_iface_mock.cpp
rename to subprojects/ncsid/test/net_iface_mock.cpp
diff --git a/ncsid/test/net_iface_mock.h b/subprojects/ncsid/test/net_iface_mock.h
similarity index 100%
rename from ncsid/test/net_iface_mock.h
rename to subprojects/ncsid/test/net_iface_mock.h
diff --git a/ncsid/test/nic_mock.cpp b/subprojects/ncsid/test/nic_mock.cpp
similarity index 100%
rename from ncsid/test/nic_mock.cpp
rename to subprojects/ncsid/test/nic_mock.cpp
diff --git a/ncsid/test/nic_mock.h b/subprojects/ncsid/test/nic_mock.h
similarity index 100%
rename from ncsid/test/nic_mock.h
rename to subprojects/ncsid/test/nic_mock.h
diff --git a/ncsid/test/normalize_ip_test.sh b/subprojects/ncsid/test/normalize_ip_test.sh
similarity index 100%
rename from ncsid/test/normalize_ip_test.sh
rename to subprojects/ncsid/test/normalize_ip_test.sh
diff --git a/ncsid/test/normalize_mac_test.sh b/subprojects/ncsid/test/normalize_mac_test.sh
similarity index 100%
rename from ncsid/test/normalize_mac_test.sh
rename to subprojects/ncsid/test/normalize_mac_test.sh
diff --git a/ncsid/test/sock_test.cpp b/subprojects/ncsid/test/sock_test.cpp
similarity index 100%
rename from ncsid/test/sock_test.cpp
rename to subprojects/ncsid/test/sock_test.cpp
diff --git a/ncsid/test/test_lib.sh b/subprojects/ncsid/test/test_lib.sh
similarity index 100%
rename from ncsid/test/test_lib.sh
rename to subprojects/ncsid/test/test_lib.sh