diff options
| author | Alejandro Soto <alejandro@34project.org> | 2024-05-22 15:01:50 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2024-05-24 05:58:43 -0600 |
| commit | e12e7af8b9d125a2dbd247dcd71896e4a6873d5a (patch) | |
| tree | c770617039e518b6539b179ac96d98b2d71b817b /mk/meson.mk | |
| parent | 3ac78307acfb919271587c3638a20f644f524658 (diff) | |
mk: implement support for meson, ninja
Diffstat (limited to 'mk/meson.mk')
| -rw-r--r-- | mk/meson.mk | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mk/meson.mk b/mk/meson.mk new file mode 100644 index 0000000..991dc79 --- /dev/null +++ b/mk/meson.mk @@ -0,0 +1,23 @@ +ninja_dir = $(obj)/ninja/$(1) + +define hooks/meson + define obj_rules + meson_stamp := $$(call ninja_dir,$(1))/meson.stamp + ninja_stamp := $$(call ninja_dir,$(1))/ninja.stamp + + $$(call require_core_objs,$(1),meson_objs): $$(ninja_stamp) + + $$(ninja_stamp): $$(meson_stamp) + $$(call run,NINJA,$(1)) $$(NINJA) -C $$(call ninja_dir,$(1)) install + @touch $$@ + + $$(meson_stamp): | $$(obj) + $$(meson_stamp): $$(call meson_src,$(1)) $$(obj_deps) + $$(call run,MESON,$(1)) $$(MESON) setup \ + $$(call require_core_paths,$(1),meson_src) $$(call ninja_dir,$(1)) \ + $$(core_info/$(1)/meson_args) + @touch $$@ + endef + + $$(eval $$(call add_obj_rules,$(1))) +endef |
