openbsd-ports/x11/i3/patches/patch-Makefile
dcoppa 2b72bc6e2f Update to i3-3.5.1
resolve_tilde() function by Christopher Zimmermann
(madroach AT zakweb DOT de): thanks!

OK landry@
2010-09-14 08:54:18 +00:00

59 lines
2.5 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.3 2010/09/14 08:54:18 dcoppa Exp $
--- Makefile.orig Wed Jun 9 09:58:15 2010
+++ Makefile Mon Jul 19 17:07:45 2010
@@ -20,20 +20,14 @@ endif
# Depend on the specific file (.c for each .o) and on all headers
src/%.o: src/%.c ${HEADERS}
- echo "CC $<"
$(CC) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/$(shell basename $< .c)/ { print NR }' loglevels.tmp))" -c -o $@ $<
all: src/cfgparse.y.o src/cfgparse.yy.o ${FILES}
- echo "LINK i3"
$(CC) -o i3 ${FILES} src/cfgparse.y.o src/cfgparse.yy.o $(LDFLAGS)
- echo ""
- echo "SUBDIR i3-msg"
$(MAKE) TOPDIR=$(TOPDIR) -C i3-msg
- echo "SUBDIR i3-input"
$(MAKE) TOPDIR=$(TOPDIR) -C i3-input
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); \
@@ -45,27 +39,24 @@ 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) $<
$(CC) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cfgparse.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) $(CFLAGS) -DLOGLEVEL="(1 << $(shell awk '/cfgparse.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-wsbar $(DESTDIR)$(PREFIX)/bin/
- test -e $(DESTDIR)$(SYSCONFDIR)/i3/config || $(INSTALL) -m 0644 i3.config $(DESTDIR)$(SYSCONFDIR)/i3/config
- $(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-wsbar $(DESTDIR)$(PREFIX)/bin/
+ test -e $(DESTDIR)$(SYSCONFDIR)/i3/config || ${INSTALL_DATA} i3.config $(DESTDIR)$(SYSCONFDIR)/i3/config
+ ${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/
$(MAKE) TOPDIR=$(TOPDIR) -C i3-msg install
$(MAKE) TOPDIR=$(TOPDIR) -C i3-input install