openbsd-ports/x11/i3/patches/patch-Makefile
dcoppa 71c6e11302 Update to i3-4.0.2 (plus patches from upstream git).
i3bar is now part of i3 itself and i3-wsbar is gone.
2011-11-06 20:23:24 +00:00

96 lines
3.7 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.4 2011/11/06 20:23:25 dcoppa Exp $
--- Makefile.orig Wed Sep 14 11:28:41 2011
+++ Makefile Wed Sep 14 11:34:03 2011
@@ -22,24 +22,19 @@ SUBDIRS=i3-msg i3-input i3-nagbar i3-config-wizard i3b
# Depend on the specific file (.c for each .o) and on all headers
src/%.o: src/%.c ${HEADERS}
- echo "CC $<"
$(CC) $(CPPFLAGS) $(CFLAGS) -DLOGLEVEL="((uint64_t)1 << $(shell awk '/$(shell basename $< .c)/ { print NR; exit 0; }' loglevels.tmp))" -c -o $@ $<
all: i3 subdirs
i3: src/cfgparse.y.o src/cfgparse.yy.o src/cmdparse.y.o src/cmdparse.yy.o ${FILES}
- echo "LINK i3"
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
subdirs:
for dir in $(SUBDIRS); do \
- echo ""; \
- echo "MAKE $$dir"; \
$(MAKE) -C $$dir; \
done
loglevels.h:
- echo "LOGLEVELS"
for file in $$(ls src/*.c src/*.y src/*.l | grep -v 'cfgparse.\(tab\|yy\).c'); \
do \
echo $$(basename $$file .c); \
@@ -51,40 +46,35 @@ loglevels.h:
echo "};") > include/loglevels.h;
src/cfgparse.yy.o: src/cfgparse.l src/cfgparse.y.o ${HEADERS}
- echo "LEX $<"
- flex -i -o$(@:.o=.c) $<
+ gflex -i -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}
- echo "LEX $<"
- flex -Pcmdyy -i -o$(@:.o=.c) $<
+ gflex -Pcmdyy -i -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}
- echo "YACC $<"
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)
src/cmdparse.y.o: src/cmdparse.y ${HEADERS}
- echo "YACC $<"
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)
install: all
- echo "INSTALL"
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
$(INSTALL) -d -m 0755 $(DESTDIR)$(SYSCONFDIR)/i3
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/include/i3
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/xsessions
- $(INSTALL) -m 0755 i3 $(DESTDIR)$(PREFIX)/bin/
- $(INSTALL) -m 0755 i3-migrate-config-to-v4 $(DESTDIR)$(PREFIX)/bin/
- test -e $(DESTDIR)$(SYSCONFDIR)/i3/config || $(INSTALL) -m 0644 i3.config $(DESTDIR)$(SYSCONFDIR)/i3/config
- test -e $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes || $(INSTALL) -m 0644 i3.config.keycodes $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes
- $(INSTALL) -m 0644 i3.welcome $(DESTDIR)$(SYSCONFDIR)/i3/welcome
- $(INSTALL) -m 0644 i3.desktop $(DESTDIR)$(PREFIX)/share/xsessions/
- $(INSTALL) -m 0644 include/i3/ipc.h $(DESTDIR)$(PREFIX)/include/i3/
+ ${INSTALL_PROGRAM} i3 $(DESTDIR)$(PREFIX)/bin/
+ ${INSTALL_SCRIPT} i3-migrate-config-to-v4 $(DESTDIR)$(PREFIX)/bin/
+ test -e $(DESTDIR)$(SYSCONFDIR)/i3/config || ${INSTALL_DATA} i3.config $(DESTDIR)$(SYSCONFDIR)/i3/config
+ test -e $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes || ${INSTALL_DATA} i3.config.keycodes $(DESTDIR)$(SYSCONFDIR)/i3/config.keycodes
+ ${INSTALL_DATA} i3.welcome $(DESTDIR)$(SYSCONFDIR)/i3/welcome
+ ${INSTALL_DATA} i3.desktop $(DESTDIR)$(PREFIX)/share/xsessions/
+ ${INSTALL_DATA} include/i3/ipc.h $(DESTDIR)$(PREFIX)/include/i3/
for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir install; \
done
@@ -120,16 +110,12 @@ clean:
$(MAKE) -C docs clean
$(MAKE) -C man clean
for dir in $(SUBDIRS); do \
- echo ""; \
- echo "CLEAN $$dir"; \
$(MAKE) TOPDIR=$(TOPDIR) -C $$dir distclean; \
done
distclean: clean
rm -f i3
for dir in $(SUBDIRS); do \
- echo ""; \
- echo "DISTCLEAN $$dir"; \
$(MAKE) TOPDIR=$(TOPDIR) -C $$dir distclean; \
done