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:
21
Makefile
21
Makefile
@@ -3,16 +3,16 @@ LD = 9l
|
||||
PKG_CONFIG ?= pkg-config
|
||||
CFLAGS ?= -O2 -g
|
||||
WARN_CFLAGS = -Wall -Wextra
|
||||
PKG_CFLAGS = $(shell $(PKG_CONFIG) --cflags dbus-1 xkbcommon)
|
||||
PKG_LIBS = $(shell $(PKG_CONFIG) --libs dbus-1 xkbcommon)
|
||||
IBUS_CFLAGS = $(shell $(PKG_CONFIG) --cflags dbus-1 xkbcommon)
|
||||
IBUS_LIBS = $(shell $(PKG_CONFIG) --libs dbus-1 xkbcommon)
|
||||
XIM_CFLAGS = $(shell $(PKG_CONFIG) --cflags xcb-imdkit xkbcommon-x11)
|
||||
XIM_LIBS = $(shell $(PKG_CONFIG) --libs xcb-imdkit xkbcommon-x11)
|
||||
TEXT_CFLAGS = $(shell $(PKG_CONFIG) --cflags pangocairo cairo)
|
||||
TEXT_LIBS = $(shell $(PKG_CONFIG) --libs pangocairo cairo)
|
||||
POPUP_CFLAGS = $(shell $(PKG_CONFIG) --cflags xcb-randr)
|
||||
POPUP_LIBS = $(shell $(PKG_CONFIG) --libs xcb-randr)
|
||||
PROJECT_CPPFLAGS = $(PKG_CFLAGS)
|
||||
PROJECT_LDLIBS = -lthread -lbio -lxcb $(PKG_LIBS) $(TEXT_LIBS) \
|
||||
PROJECT_CPPFLAGS =
|
||||
PROJECT_LDLIBS = -lthread -lbio -lxcb $(IBUS_LIBS) $(TEXT_LIBS) \
|
||||
$(XIM_LIBS) $(POPUP_LIBS)
|
||||
PROG = strans
|
||||
DOCKER_IMAGE = strans-build
|
||||
@@ -31,6 +31,7 @@ $(PROG): $(OBJS)
|
||||
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(PROJECT_LDLIBS) $(LDLIBS)
|
||||
|
||||
$(OBJS): dat.h fn.h ipc.h
|
||||
ibus.o: PROJECT_CPPFLAGS += $(IBUS_CFLAGS)
|
||||
font.o: PROJECT_CPPFLAGS += $(TEXT_CFLAGS)
|
||||
win.o: PROJECT_CPPFLAGS += $(POPUP_CFLAGS)
|
||||
$(XIMOBJS): PROJECT_CPPFLAGS += -I. $(XIM_CFLAGS)
|
||||
@@ -55,20 +56,20 @@ docker-image: Dockerfile
|
||||
docker build -t $(DOCKER_IMAGE) - < Dockerfile
|
||||
|
||||
docker-build:
|
||||
$(DOCKER_RUN) make -B all
|
||||
$(DOCKER_RUN) sh -c 'make clean && make all'
|
||||
|
||||
docker-check:
|
||||
$(DOCKER_RUN) make -B check check-live check-stress \
|
||||
UNITARGS="$(UNITARGS)"
|
||||
$(DOCKER_RUN) sh -c 'make clean && \
|
||||
make check check-live check-stress UNITARGS="$(UNITARGS)"'
|
||||
|
||||
docker-check-live:
|
||||
$(DOCKER_RUN) make -B check-live
|
||||
$(DOCKER_RUN) sh -c 'make clean && make check-live'
|
||||
|
||||
docker-check-stress:
|
||||
$(DOCKER_RUN) make -B check-stress
|
||||
$(DOCKER_RUN) sh -c 'make clean && make check-stress'
|
||||
|
||||
docker-bench:
|
||||
$(DOCKER_RUN) make -B bench
|
||||
$(DOCKER_RUN) sh -c 'make clean && make bench'
|
||||
|
||||
docker: docker-image
|
||||
$(MAKE) docker-build
|
||||
|
||||
Reference in New Issue
Block a user