build: scope IBus flags, rebuild containers with clean, dedup gtk install

Only ibus.o needs the D-Bus and xkbcommon flags, so give them the same
per-object scoping as the popup and XIM objects. The docker targets used
-B, which recursive makes inherit: the daemon was linked three times and
the live tests built twice per docker-check. gtk/Makefile repeated the
module-directory check and cache refresh in install and uninstall.
This commit is contained in:
2026-08-16 15:46:00 +09:00
parent 61840fc108
commit d3c9813f6e
2 changed files with 21 additions and 30 deletions

View File

@@ -21,30 +21,20 @@ $(PROG): main.c ../ipc.c ../ipc.h
$(CC) $(CPPFLAGS) -I.. $(GTK_CFLAGS) -Wall $(CFLAGS) $(LDFLAGS) \
-shared -fPIC -o $@ main.c ../ipc.c $(GTK_LIBS) $(LDLIBS)
CHECKDIR = test -n "$$module_dir" || { \
echo "cannot find GTK 3 module directory; set GTK_MODULE_DIR" >&2; \
exit 1; }
REFRESH = test -n "$(DESTDIR)" || { \
unset GTK_PATH GTK_IM_MODULE_FILE; $(GTK_QUERY_IMMODULES) --update-cache; }
install: $(PROG)
module_dir="$(GTK_MODULE_DIR)"; \
test -n "$$module_dir" || { \
echo "cannot find GTK 3 module directory; set GTK_MODULE_DIR" >&2; \
exit 1; \
}; \
module_dir="$(GTK_MODULE_DIR)"; $(CHECKDIR); \
mkdir -p "$(DESTDIR)$$module_dir" && \
cp "$(PROG)" "$(DESTDIR)$$module_dir/" && \
if test -z "$(DESTDIR)"; then \
unset GTK_PATH GTK_IM_MODULE_FILE; \
$(GTK_QUERY_IMMODULES) --update-cache; \
fi
cp "$(PROG)" "$(DESTDIR)$$module_dir/" && $(REFRESH)
uninstall:
module_dir="$(GTK_MODULE_DIR)"; \
test -n "$$module_dir" || { \
echo "cannot find GTK 3 module directory; set GTK_MODULE_DIR" >&2; \
exit 1; \
}; \
rm -f "$(DESTDIR)$$module_dir/$(PROG)" && \
if test -z "$(DESTDIR)"; then \
unset GTK_PATH GTK_IM_MODULE_FILE; \
$(GTK_QUERY_IMMODULES) --update-cache; \
fi
module_dir="$(GTK_MODULE_DIR)"; $(CHECKDIR); \
rm -f "$(DESTDIR)$$module_dir/$(PROG)" && $(REFRESH)
clean:
rm -f $(PROG)