mirror of
https://github.com/0intro/wmii
synced 2024-11-24 22:59:45 +03:00
More build system cleanup. Install README.
This commit is contained in:
parent
730828f28e
commit
05cbfe09cf
15
Makefile
15
Makefile
@ -1,23 +1,23 @@
|
||||
ROOT=.
|
||||
include ${ROOT}/mk/hdr.mk
|
||||
include ${ROOT}/mk/wmii.mk
|
||||
|
||||
PDIRS = \
|
||||
doc \
|
||||
man \
|
||||
cmd \
|
||||
libwmii_hack \
|
||||
rc \
|
||||
alternative_wmiircs \
|
||||
doc \
|
||||
man
|
||||
alternative_wmiircs
|
||||
|
||||
DIRS = \
|
||||
libbio \
|
||||
libfmt \
|
||||
libregexp \
|
||||
libutf \
|
||||
${PDIRS}
|
||||
$(PDIRS)
|
||||
|
||||
config:
|
||||
ROOT="${ROOT}" ${ROOT}/util/genconfig
|
||||
DOCS = README
|
||||
|
||||
deb-dep:
|
||||
apt-get -qq install build-essential debhelper libxext-dev x11proto-xext-dev libx11-dev libxrandr-dev
|
||||
@ -26,6 +26,5 @@ deb:
|
||||
dpkg-buildpackage -rfakeroot
|
||||
|
||||
include ${ROOT}/mk/dir.mk
|
||||
INSTDIRS = ${PDIRS}
|
||||
.PHONY: config
|
||||
INSTDIRS = $(PDIRS)
|
||||
|
||||
|
@ -3,19 +3,11 @@ include $(ROOT)/mk/hdr.mk
|
||||
include $(ROOT)/mk/wmii.mk
|
||||
|
||||
BIN = $(ETC)/wmii$(CONFVERSION)
|
||||
TARG = python \
|
||||
DIRS = python \
|
||||
plan9port \
|
||||
ruby
|
||||
|
||||
$(TARG:%=%.install):
|
||||
echo INSTALL $$($(CLEANNAME) $(BASE)${@:.install=})
|
||||
cp -r ${@:.install=} $(DESTDIR)$(BIN)
|
||||
$(TARG:%=%.uninstall):
|
||||
echo UNINSTALL $$($(CLEANNAME) $(BASE)${@:.uninstall=})
|
||||
rm -rf $(DESTDIR)$(BIN)/${@:.uninstall=}
|
||||
|
||||
.PHONY: $(TARG:%=%.install) $(TARG:%=%.uninstall)
|
||||
|
||||
install: $(TARG:%=%.install)
|
||||
uninstall: $(TARG:%=%.uninstall)
|
||||
DOCS = README
|
||||
DOCDIR = $(DOC)/alternative_wmiircs
|
||||
|
||||
include $(ROOT)/mk/dir.mk
|
||||
|
@ -44,7 +44,7 @@ def setbackground(color):
|
||||
call('xsetroot', '-solid', color)
|
||||
setbackground(background)
|
||||
|
||||
terminal = 'wmiir', 'setsid', 'xterm'
|
||||
terminal = 'wmiir', 'setsid', '@TERMINAL@'
|
||||
pygmi.shell = os.environ.get('SHELL', 'sh')
|
||||
|
||||
@defmonitor
|
||||
|
@ -15,7 +15,7 @@
|
||||
# Program preferences.
|
||||
#
|
||||
program:
|
||||
terminal: urxvt
|
||||
terminal: @TERMINAL@
|
||||
browser: firefox
|
||||
editor: mousepad
|
||||
filer: thunar
|
||||
|
@ -72,7 +72,7 @@ rescue Exception => e
|
||||
LOG.error e
|
||||
|
||||
# allow the user to rescue themselves
|
||||
system 'xterm &'
|
||||
system '@TERMINAL@ &'
|
||||
|
||||
IO.popen('xmessage -nearmouse -file - -buttons Recover,Ignore -print', 'w+') do |f|
|
||||
f.puts e.inspect, e.backtrace
|
||||
|
23
man/wmii.1
23
man/wmii.1
@ -174,6 +174,11 @@ tab(^); ll.
|
||||
.TE
|
||||
|
||||
.SS Default Key Bindings
|
||||
.P
|
||||
All of the provided \fBwmiirc\fR scripts accept at least the following key
|
||||
bindings. They should also provide a \fBshowkeys\fR action to open a
|
||||
key binding quick\-reference.
|
||||
|
||||
.SS Moving Around
|
||||
.TS
|
||||
tab(^); ll.
|
||||
@ -451,6 +456,15 @@ Where the arguments are defined as follows:
|
||||
area
|
||||
Selects a column or the floating area.
|
||||
|
||||
.nf
|
||||
area ::= \fI<area_spec>\fR | \fI<screen_spec>\fR:\fI<area_spec>\fR
|
||||
.fi
|
||||
|
||||
|
||||
When \fI<screen_spec>\fR is omitted and \fI<area_spec>\fR is not "sel",
|
||||
0 is assumed. "sel" by itself represents the selected client no
|
||||
matter which screen it is on.
|
||||
|
||||
.nf
|
||||
area_spec ::= "~" | \fI<number>\fR | "sel"
|
||||
.fi
|
||||
@ -466,15 +480,6 @@ index, starting at one.
|
||||
|
||||
Where \fI<number>\fR representes the 0\-based Xinerama screen number.
|
||||
|
||||
.nf
|
||||
area ::= \fI<area_spec>\fR | \fI<screen_spec>\fR:\fI<area_spec>\fR
|
||||
.fi
|
||||
|
||||
|
||||
When \fI<screen_spec>\fR is omitted and \fI<area_spec>\fR is not "sel",
|
||||
0 is assumed. "sel" by itself represents the selected client no
|
||||
matter which screen it is on.
|
||||
|
||||
.TP
|
||||
frame
|
||||
Selects a client window.
|
||||
|
22
mk/common.mk
22
mk/common.mk
@ -1,12 +1,21 @@
|
||||
all:
|
||||
|
||||
install: all
|
||||
install: all simpleinstall
|
||||
uninstall: simpleuninstall
|
||||
|
||||
MANDIRS=$(MAN)/man1
|
||||
mkdirs:
|
||||
for i in $(BIN) $(ETC) $(DOC) $(LIBDIR) $(MANDIRS) $(INCLUDE); do \
|
||||
test -d $(DESTDIR)$$i || echo MKDIR $$i; \
|
||||
mkdir -pm 0755 $(DESTDIR)$$i; \
|
||||
DOCDIR = $(DOC)
|
||||
simpleinstall:
|
||||
for f in $(DOCS); do \
|
||||
$(INSTALL) 0644 $$f $(DOCDIR)/$$f; \
|
||||
done
|
||||
for f in $(TEXT); do \
|
||||
$(INSTALL) 0644 $$f $(DIR)/$$f; \
|
||||
done
|
||||
for f in $(BINARY); do \
|
||||
$(INSTALL) -b 0644 $$f $(DIR)/$$f; \
|
||||
done
|
||||
for f in $(EXECS); do \
|
||||
$(INSTALL) -b 0755 $$f $(DIR)/$$f; \
|
||||
done
|
||||
|
||||
cleandep:
|
||||
@ -26,3 +35,4 @@ DEP!=echo /dev/null
|
||||
include $(DEP)
|
||||
|
||||
.PHONY: all options clean dist install uninstall depend cleandep tags
|
||||
.PHONY: simpleuninstall simpleinstall
|
||||
|
84
mk/hdr.mk
84
mk/hdr.mk
@ -2,11 +2,11 @@ FILTER = cat
|
||||
|
||||
EXCFLAGS = $(INCLUDES) -D_XOPEN_SOURCE=600
|
||||
|
||||
COMPILE = $(ROOT)/util/compile "$(CC)" "$(EXCFLAGS) $(CFLAGS) $$(pkg-config --cflags $(PACKAGES))"
|
||||
COMPILEPIC = $(ROOT)/util/compile "$(CC)" "$(EXCFLAGS) $(CFLAGS) $$(pkg-config --cflags $(PACKAGES)) $(SOCFLAGS)"
|
||||
COMPILE = $(ROOT)/util/compile "$(CC)" "$(EXCFLAGS) $(CFLAGS) $$(pkg-config --cflags $(PACKAGES))"
|
||||
COMPILEPIC = $(ROOT)/util/compile "$(CC)" "$(EXCFLAGS) $(CFLAGS) $$(pkg-config --cflags $(PACKAGES)) $(SOCFLAGS)"
|
||||
|
||||
LINK = $(ROOT)/util/link "$(LD)" "$$(pkg-config --libs $(PACKAGES)) $(LDFLAGS)"
|
||||
LINKSO = $(ROOT)/util/link "$(LD)" "$$(pkg-config --libs $(PACKAGES)) $(SOLDFLAGS) $(SHARED)"
|
||||
LINK = $(ROOT)/util/link "$(LD)" "$$(pkg-config --libs $(PACKAGES)) $(LDFLAGS)"
|
||||
LINKSO = $(ROOT)/util/link "$(LD)" "$$(pkg-config --libs $(PACKAGES)) $(SOLDFLAGS) $(SHARED)"
|
||||
|
||||
CLEANNAME=$(ROOT)/util/cleanname
|
||||
|
||||
@ -40,7 +40,8 @@ all:
|
||||
|
||||
.c.depend:
|
||||
echo MKDEP $<
|
||||
$(MKDEP) $(EXCFLAGS) $(CFLAGS) $< >>.depend
|
||||
[ "$$noisycc" = 1 ] && echo $(MKDEP) $(EXCFLAGS) $(CFLAGS) $$(pkg-config --cflags $(PACKAGES)) $< || true
|
||||
$(MKDEP) $(EXCFLAGS) $(CFLAGS) $$(pkg-config --cflags $(PACKAGES)) $< >>.depend
|
||||
|
||||
.sh.depend .rc.depend .1.depend .awk.depend:
|
||||
:
|
||||
@ -56,61 +57,59 @@ all:
|
||||
$(COMPILE) ${<:.c=.o} $<
|
||||
$(LINK) $@ ${<:.c=.o}
|
||||
|
||||
.sh.out:
|
||||
echo FILTER $(BASE)$<
|
||||
$(FILTER) $< >$@
|
||||
sh -n $@
|
||||
chmod 0755 $@
|
||||
.rc.out .awk.out:
|
||||
.rc.out .awk.out .sh.out:
|
||||
echo FILTER $(BASE)$<
|
||||
[ -n "${<:%.sh=}" ] || sh -n $<
|
||||
$(FILTER) $< >$@
|
||||
chmod 0755 $@
|
||||
|
||||
.man1.1:
|
||||
echo TXT2TAGS $(BASE)$<
|
||||
txt2tags -o- $< >$@
|
||||
|
||||
INSTALL= _install() { set -e; \
|
||||
dashb=$$1; [ $$1 = -b ] && shift; \
|
||||
d=$$(dirname $$3); \
|
||||
if [ ! -d $$d ]; then echo MKDIR $$d; mkdir -p $(DESTDIR)$$d; fi; \
|
||||
echo INSTALL $$($(CLEANNAME) $(BASE)$$2); \
|
||||
if [ "$$dashb" = -b ]; \
|
||||
then cp -f $$2 $(DESTDIR)$$3; \
|
||||
else $(FILTER) <$$2 >$(DESTDIR)$$3; \
|
||||
fi; \
|
||||
chmod $$1 $(DESTDIR)$$3; \
|
||||
}; _install
|
||||
UNINSTALL= _uninstall() { set -e; \
|
||||
echo UNINSTALL $$($(CLEANNAME) $(BASE)$$2); \
|
||||
rm -f $(DESTDIR)$$3; \
|
||||
}; _uninstall
|
||||
|
||||
.out.install:
|
||||
echo INSTALL $$($(CLEANNAME) $(BASE)$*)
|
||||
cp -f $< $(DESTDIR)$(BIN)/$*
|
||||
chmod 0755 $(DESTDIR)$(BIN)/$*
|
||||
$(INSTALL) -b 0755 $< $(BIN)/$*
|
||||
.out.uninstall:
|
||||
echo UNINSTALL $$($(CLEANNAME) $(BASE)$*)
|
||||
rm -f $(DESTDIR)$(BIN)/$*
|
||||
$(UNINSTALL) $< $(BIN)/$*
|
||||
|
||||
.a.install .$(SOEXT).install:
|
||||
echo INSTALL $$($(CLEANNAME) $(BASE)$<)
|
||||
cp -f $< $(DESTDIR)$(LIBDIR)/$<
|
||||
chmod 0644 $(DESTDIR)$(LIBDIR)/$<
|
||||
$(INSTALL) -b 0644 $< $(LIBDIR)/$<
|
||||
.a.uninstall .$(SOEXT).uninstall:
|
||||
echo UNINSTALL $$($(CLEANNAME) $(BASE)$<)
|
||||
rm -f $(DESTDIR)$(LIBDIR)/$<
|
||||
$(UNINSTALL) $< $(LIBDIR)/$<
|
||||
|
||||
.h.install:
|
||||
echo INSTALL $$($(CLEANNAME) $(BASE)$<)
|
||||
cp -f $< $(DESTDIR)$(INCLUDE)/$<
|
||||
chmod 0644 $(DESTDIR)$(INCLUDE)/$<
|
||||
$(INSTALL) 0644 $< $(INCLUDE)/$<
|
||||
.h.uninstall:
|
||||
echo UNINSTALL $$($(CLEANNAME) $(BASE)$<)
|
||||
rm -f $(DESTDIR)$(INCLUDE)/$<
|
||||
$(UNINSTALL) $< $(INCLUDE)/$<
|
||||
|
||||
.pdf.install:
|
||||
echo INSTALL $$($(CLEANNAME) $(BASE)$<)
|
||||
cp -f $< $(DESTDIR)$(DOC)/$<
|
||||
chmod 0644 $(DESTDIR)$(DOC)/$<
|
||||
$(INSTALL) -b 0644 $< $(DOC)/$<
|
||||
.pdf.uninstall:
|
||||
echo UNINSTALL $$($(CLEANNAME) $(BASE)$<)
|
||||
rm -f $(DESTDIR)$(DOC)/$<
|
||||
$(UNINSTALL) $< $(DOC)/$<
|
||||
|
||||
.1.install:
|
||||
set -e; \
|
||||
man=1; \
|
||||
path="$(MAN)/man$$man/$*.$$man"; \
|
||||
echo INSTALL man $$($(CLEANNAME) "$(BASE)/$*($$man)"); \
|
||||
$(FILTER) <"$<" >$(DESTDIR)"$$path"; \
|
||||
chmod 0644 $(DESTDIR)"$$path"
|
||||
.1.uninstall:
|
||||
echo UNINSTALL man $$($(CLEANNAME) $*'(1)')
|
||||
rm -f $(DESTDIR)$(MAN)/man1/$<
|
||||
INSTALMAN= _installman() { man=$${1\#\#*.}; $(INSTALL) 0644 $$1 $(MAN)/man$$man/$$1; }; _installman
|
||||
UNINSTALLMAN=_uninstallman() { man=$${1\#\#*.}; $(UNINSTALL) $$1 $(MAN)/man$$man/$$1; }; _uninstallman
|
||||
MANSECTIONS=1 2 3 4 5 6 7 8 9
|
||||
${MANSECTIONS:%=.%.install}:
|
||||
$(INSTALMAN) $<
|
||||
${MANSECTIONS:%=.%.uninstall}:
|
||||
$(UNINSTALL) $<
|
||||
|
||||
.out.clean:
|
||||
echo CLEAN $$($(CLEANNAME) $(BASE)$<)
|
||||
@ -121,9 +120,8 @@ all:
|
||||
rm -f $< || true 2>/dev/null
|
||||
|
||||
printinstall:
|
||||
mkdirs:
|
||||
clean:
|
||||
install: printinstall mkdirs
|
||||
install: printinstall
|
||||
depend: cleandep
|
||||
|
||||
include $(ROOT)/mk/common.mk
|
||||
|
Loading…
Reference in New Issue
Block a user