Welcome to little lamb

Code » comain » commit 041e29d

common.mk: Fix not installing $LIBDIR/comain/$LIBS

author Olivier Brunel
2023-07-18 16:47:19 UTC
committer Olivier Brunel
2023-07-18 16:52:02 UTC
parent 05290fba3a0242cda2c1038ec86b7fe87e6f0660

common.mk: Fix not installing $LIBDIR/comain/$LIBS

common.mk +10 -2

diff --git a/common.mk b/common.mk
index 4fa0126..43e49fe 100644
--- a/common.mk
+++ b/common.mk
@@ -87,7 +87,7 @@ build/%.lo: src/%.c Makefile common.mk config.mk project.mk | build
 		-c $<
 	@test -e $(@:%.lo=%.d) && mv $(@:%.lo=%.d) $(@:%.lo=%.lo.d)
 
-build/comain/%:
+build/comain/%: | build
 	$(_SAY) Making comain confdir :
 	$(_CMN) comain/mkcmn $@
 
@@ -141,6 +141,13 @@ endif
 $(DESTDIR)$(BINDIR)/%: %
 	$(_INST) install -D -m 755 $< $@
 
+# install comain confdir
+$(DESTDIR)$(LIBDIR)/comain: build/comain
+	$(_DIR) mkdir -p $@
+
+$(DESTDIR)$(LIBDIR)/comain/%: build/comain/% | $(DESTDIR)$(LIBDIR)/comain
+	$(_INST) cp -aR $< $@
+
 # install shared libs
 $(DESTDIR)$(LIBDIR)/%.so: %.so
 	$(_INST) install -D -m 755 $< $@
@@ -178,7 +185,8 @@ $(DESTDIR)$(SHAREDIR)/$(PROJECT_NAME)/%:
 
 install-bins: $(BINS:%=$(DESTDIR)$(BINDIR)/%)
 
-install-libs: $(STATIC_LIBS:%=$(DESTDIR)$(LIBDIR)/%) \
+install-libs: $(LIBS:%=$(DESTDIR)$(LIBDIR)/comain/%) \
+	$(STATIC_LIBS:%=$(DESTDIR)$(LIBDIR)/%) \
 	$(SHARED_LIBS:%=$(DESTDIR)$(LIBDIR)/%)
 
 install-priv: $(PRIV_STATIC_LIBS:%=$(DESTDIR)$(LIBDIR)/$(PROJECT_NAME)/%) \