Makefiles: prefix compilation messages (for parallel builds)
This commit is contained in:
parent
e73812802c
commit
4f6e58e250
14
Makefile
14
Makefile
|
@ -22,7 +22,7 @@ SUBDIRS:=i3-msg i3-input i3-nagbar i3-config-wizard i3bar
|
||||||
|
|
||||||
# Depend on the specific file (.c for each .o) and on all headers
|
# Depend on the specific file (.c for each .o) and on all headers
|
||||||
src/%.o: src/%.c ${HEADERS}
|
src/%.o: src/%.c ${HEADERS}
|
||||||
echo "CC $<"
|
echo "[i3] CC $<"
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="((uint64_t)1 << $(shell awk '/$(shell basename $< .c)/ { print NR; exit 0; }' loglevels.tmp))" -c -o $@ $<
|
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="((uint64_t)1 << $(shell awk '/$(shell basename $< .c)/ { print NR; exit 0; }' loglevels.tmp))" -c -o $@ $<
|
||||||
|
|
||||||
all: i3 subdirs
|
all: i3 subdirs
|
||||||
|
@ -39,7 +39,7 @@ subdirs:
|
||||||
done
|
done
|
||||||
|
|
||||||
loglevels.h:
|
loglevels.h:
|
||||||
echo "LOGLEVELS"
|
echo "[i3] LOGLEVELS"
|
||||||
for file in $$(ls src/*.c src/*.y src/*.l | grep -v 'cfgparse.\(tab\|yy\).c'); \
|
for file in $$(ls src/*.c src/*.y src/*.l | grep -v 'cfgparse.\(tab\|yy\).c'); \
|
||||||
do \
|
do \
|
||||||
echo $$(basename $$file .c); \
|
echo $$(basename $$file .c); \
|
||||||
|
@ -51,29 +51,29 @@ loglevels.h:
|
||||||
echo "};") > include/loglevels.h;
|
echo "};") > include/loglevels.h;
|
||||||
|
|
||||||
src/cfgparse.yy.o: src/cfgparse.l src/cfgparse.y.o ${HEADERS}
|
src/cfgparse.yy.o: src/cfgparse.l src/cfgparse.y.o ${HEADERS}
|
||||||
echo "LEX $<"
|
echo "[i3] LEX $<"
|
||||||
flex -i -o$(@:.o=.c) $<
|
flex -i -o$(@:.o=.c) $<
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cfgparse.l/ { print NR }' loglevels.tmp))" -c -o $@ $(@:.o=.c)
|
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cfgparse.l/ { print NR }' loglevels.tmp))" -c -o $@ $(@:.o=.c)
|
||||||
|
|
||||||
src/cmdparse.yy.o: src/cmdparse.l src/cmdparse.y.o ${HEADERS}
|
src/cmdparse.yy.o: src/cmdparse.l src/cmdparse.y.o ${HEADERS}
|
||||||
echo "LEX $<"
|
echo "[i3] LEX $<"
|
||||||
flex -Pcmdyy -i -o$(@:.o=.c) $<
|
flex -Pcmdyy -i -o$(@:.o=.c) $<
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cmdparse.l/ { print NR }' loglevels.tmp))" -c -o $@ $(@:.o=.c)
|
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cmdparse.l/ { print NR }' loglevels.tmp))" -c -o $@ $(@:.o=.c)
|
||||||
|
|
||||||
|
|
||||||
src/cfgparse.y.o: src/cfgparse.y ${HEADERS}
|
src/cfgparse.y.o: src/cfgparse.y ${HEADERS}
|
||||||
echo "YACC $<"
|
echo "[i3] YACC $<"
|
||||||
bison --debug --verbose -b $(basename $< .y) -d $<
|
bison --debug --verbose -b $(basename $< .y) -d $<
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cfgparse.y/ { print NR }' loglevels.tmp))" -c -o $@ $(<:.y=.tab.c)
|
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cfgparse.y/ { print NR }' loglevels.tmp))" -c -o $@ $(<:.y=.tab.c)
|
||||||
|
|
||||||
src/cmdparse.y.o: src/cmdparse.y ${HEADERS}
|
src/cmdparse.y.o: src/cmdparse.y ${HEADERS}
|
||||||
echo "YACC $<"
|
echo "[i3] YACC $<"
|
||||||
bison -p cmdyy --debug --verbose -b $(basename $< .y) -d $<
|
bison -p cmdyy --debug --verbose -b $(basename $< .y) -d $<
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cmdparse.y/ { print NR }' loglevels.tmp))" -c -o $@ $(<:.y=.tab.c)
|
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cmdparse.y/ { print NR }' loglevels.tmp))" -c -o $@ $(<:.y=.tab.c)
|
||||||
|
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
echo "INSTALL"
|
echo "[i3] INSTALL"
|
||||||
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
|
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
|
||||||
$(INSTALL) -d -m 0755 $(DESTDIR)$(SYSCONFDIR)/i3
|
$(INSTALL) -d -m 0755 $(DESTDIR)$(SYSCONFDIR)/i3
|
||||||
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/include/i3
|
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/include/i3
|
||||||
|
|
|
@ -10,28 +10,28 @@ HEADERS:=$(wildcard *.h)
|
||||||
|
|
||||||
# Depend on the specific file (.c for each .o) and on all headers
|
# Depend on the specific file (.c for each .o) and on all headers
|
||||||
%.o: %.c ${HEADERS}
|
%.o: %.c ${HEADERS}
|
||||||
echo "CC $<"
|
echo "[i3-config-wizard] CC $<"
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
all: i3-config-wizard
|
all: i3-config-wizard
|
||||||
|
|
||||||
i3-config-wizard: cfgparse.y.o cfgparse.yy.o ${FILES}
|
i3-config-wizard: cfgparse.y.o cfgparse.yy.o ${FILES}
|
||||||
echo "LINK i3-config-wizard"
|
echo "[i3-config-wizard] LINK i3-config-wizard"
|
||||||
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
||||||
|
|
||||||
cfgparse.yy.o: cfgparse.l cfgparse.y.o ${HEADERS}
|
cfgparse.yy.o: cfgparse.l cfgparse.y.o ${HEADERS}
|
||||||
echo "LEX $<"
|
echo "[i3-config-wizard] LEX $<"
|
||||||
flex -i -o$(@:.o=.c) $<
|
flex -i -o$(@:.o=.c) $<
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(@:.o=.c)
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(@:.o=.c)
|
||||||
|
|
||||||
cfgparse.y.o: cfgparse.y ${HEADERS}
|
cfgparse.y.o: cfgparse.y ${HEADERS}
|
||||||
echo "YACC $<"
|
echo "[i3-config-wizard] YACC $<"
|
||||||
bison --debug --verbose -b $(basename $< .y) -d $<
|
bison --debug --verbose -b $(basename $< .y) -d $<
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(<:.y=.tab.c)
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(<:.y=.tab.c)
|
||||||
|
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
echo "INSTALL"
|
echo "[i3-config-wizard] INSTALL"
|
||||||
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
|
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
|
||||||
$(INSTALL) -m 0755 i3-config-wizard $(DESTDIR)$(PREFIX)/bin/
|
$(INSTALL) -m 0755 i3-config-wizard $(DESTDIR)$(PREFIX)/bin/
|
||||||
|
|
||||||
|
|
|
@ -9,17 +9,17 @@ HEADERS=$(wildcard *.h)
|
||||||
|
|
||||||
# Depend on the specific file (.c for each .o) and on all headers
|
# Depend on the specific file (.c for each .o) and on all headers
|
||||||
%.o: %.c ${HEADERS}
|
%.o: %.c ${HEADERS}
|
||||||
echo "CC $<"
|
echo "[i3-input] CC $<"
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
all: i3-input
|
all: i3-input
|
||||||
|
|
||||||
i3-input: ${FILES}
|
i3-input: ${FILES}
|
||||||
echo "LINK i3-input"
|
echo "[i3-input] LINK i3-input"
|
||||||
$(CC) $(LDFLAGS) -o $@ ${FILES} $(LIBS)
|
$(CC) $(LDFLAGS) -o $@ ${FILES} $(LIBS)
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
echo "INSTALL"
|
echo "[i3-input] INSTALL"
|
||||||
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
|
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
|
||||||
$(INSTALL) -m 0755 i3-input $(DESTDIR)$(PREFIX)/bin/
|
$(INSTALL) -m 0755 i3-input $(DESTDIR)$(PREFIX)/bin/
|
||||||
|
|
||||||
|
|
|
@ -11,17 +11,17 @@ HEADERS=$(wildcard *.h)
|
||||||
|
|
||||||
# Depend on the specific file (.c for each .o) and on all headers
|
# Depend on the specific file (.c for each .o) and on all headers
|
||||||
%.o: %.c ${HEADERS}
|
%.o: %.c ${HEADERS}
|
||||||
echo "CC $<"
|
echo "[i3-msg] CC $<"
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
all: i3-msg
|
all: i3-msg
|
||||||
|
|
||||||
i3-msg: ${FILES}
|
i3-msg: ${FILES}
|
||||||
echo "LINK i3-msg"
|
echo "[i3-msg] LINK i3-msg"
|
||||||
$(CC) $(LDFLAGS) -o i3-msg ${FILES} $(LIBS)
|
$(CC) $(LDFLAGS) -o i3-msg ${FILES} $(LIBS)
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
echo "INSTALL"
|
echo "[i3-msg] INSTALL"
|
||||||
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
|
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
|
||||||
$(INSTALL) -m 0755 i3-msg $(DESTDIR)$(PREFIX)/bin/
|
$(INSTALL) -m 0755 i3-msg $(DESTDIR)$(PREFIX)/bin/
|
||||||
|
|
||||||
|
|
|
@ -9,17 +9,17 @@ HEADERS=$(wildcard *.h)
|
||||||
|
|
||||||
# Depend on the specific file (.c for each .o) and on all headers
|
# Depend on the specific file (.c for each .o) and on all headers
|
||||||
%.o: %.c ${HEADERS}
|
%.o: %.c ${HEADERS}
|
||||||
echo "CC $<"
|
echo "[i3-nagbar] CC $<"
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
all: i3-nagbar
|
all: i3-nagbar
|
||||||
|
|
||||||
i3-nagbar: ${FILES}
|
i3-nagbar: ${FILES}
|
||||||
echo "LINK i3-nagbar"
|
echo "[i3-nagbar] LINK i3-nagbar"
|
||||||
$(CC) $(LDFLAGS) -o $@ ${FILES} $(LIBS)
|
$(CC) $(LDFLAGS) -o $@ ${FILES} $(LIBS)
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
echo "INSTALL"
|
echo "[i3-nagbar] INSTALL"
|
||||||
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
|
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
|
||||||
$(INSTALL) -m 0755 i3-nagbar $(DESTDIR)$(PREFIX)/bin/
|
$(INSTALL) -m 0755 i3-nagbar $(DESTDIR)$(PREFIX)/bin/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue