mirror of
https://github.com/0intro/wmii
synced 2024-11-24 22:59:45 +03:00
Fix build for gmake. Add uninstall target. Fix if statement with no command.
This commit is contained in:
parent
b0e967a3e9
commit
6e54af6831
10
cmd/Makefile
10
cmd/Makefile
@ -2,6 +2,8 @@ ROOT=..
|
||||
include ${ROOT}/mk/hdr.mk
|
||||
include ${ROOT}/mk/wmii.mk
|
||||
|
||||
wmiir.c: ${ROOT}/mk/wmii.mk
|
||||
|
||||
DIRS = wmii
|
||||
TARG = wmii9menu \
|
||||
wmii9rc \
|
||||
@ -10,7 +12,7 @@ TARG = wmii9menu \
|
||||
wmiistartrc
|
||||
|
||||
OFILES = util.o
|
||||
FILTER = sed "s|CONFPREFIX|${CONFPREFIX}|g; \
|
||||
FILTER = sed "s|CONFPREFIX|${MAN}|g; \
|
||||
s|CONFVERSION|${CONFVERSION}|g; \
|
||||
s|P9PATHS|${P9PATHS}|g; \
|
||||
s|AWKPATH|${AWKPATH}|g"
|
||||
@ -18,10 +20,10 @@ FILTER = sed "s|CONFPREFIX|${CONFPREFIX}|g; \
|
||||
include ${ROOT}/mk/many.mk
|
||||
include ${ROOT}/mk/dir.mk
|
||||
|
||||
OWMIIR=${OFILES} ${LIBIXP}
|
||||
OWMIIR=wmiir.o ${OFILES} ${LIBIXP}
|
||||
wmiir.O: ${OWMIIR}
|
||||
${LINK} $@ ${STATIC} $*.o ${OWMIIR}
|
||||
${LINK} $@ ${STATIC} ${OWMIIR}
|
||||
|
||||
EXCFLAGS=${INCX11}
|
||||
wmii9menu.O:
|
||||
wmii9menu.O: wmii9menu.o
|
||||
${LINK} $@ $*.o ${LIBX11}
|
||||
|
@ -2,6 +2,8 @@ ROOT= ../..
|
||||
include ${ROOT}/mk/hdr.mk
|
||||
include ${ROOT}/mk/wmii.mk
|
||||
|
||||
main.c: ${ROOT}/mk/wmii.mk
|
||||
|
||||
TARG = wmii
|
||||
|
||||
LIB = ${LIBIXP}
|
||||
|
@ -5,8 +5,11 @@
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "wmii.h"
|
||||
#include <util.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
static void place_frame(Frame *f);
|
||||
|
||||
|
@ -3,7 +3,9 @@
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
#include <string.h>
|
||||
#include "wmii.h"
|
||||
#include <util.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
Bar *free_bars = nil;
|
||||
|
||||
|
@ -3,9 +3,12 @@
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include "wmii.h"
|
||||
#include <util.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
static void update_client_name(Client *c);
|
||||
|
||||
|
@ -4,7 +4,9 @@
|
||||
*/
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include "wmii.h"
|
||||
#include <util.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
char *
|
||||
str_of_column_mode(int mode) {
|
||||
|
@ -2,8 +2,11 @@
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "wmii.h"
|
||||
#include <util.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
uint
|
||||
textwidth_l(BlitzFont *font, char *text, uint len) {
|
||||
|
@ -2,8 +2,11 @@
|
||||
* Copyright ©2006-2007 Kris Maglione <fbsdaemon@gmail.com>
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <X11/keysym.h>
|
||||
#include "wmii.h"
|
||||
#include <util.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
#include "printevent.h"
|
||||
|
||||
void
|
||||
|
@ -1,7 +1,9 @@
|
||||
/* Copyright ©2006-2007 Kris Maglione <fbsdaemon@gmail.com>
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
#include "wmii.h"
|
||||
#include <util.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
Frame *
|
||||
create_frame(Client *c, View *v) {
|
||||
|
@ -3,10 +3,13 @@
|
||||
*/
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include "wmii.h"
|
||||
#include <util.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
|
||||
/* Datatypes: */
|
||||
|
@ -1,7 +1,10 @@
|
||||
/* Copyright ©2004-2006 Anselm R. Garbe <garbeam at gmail dot com>
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
#include "wmii.h"
|
||||
#include <stdio.h>
|
||||
#include <util.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
Bool
|
||||
ptinrect(int x, int y, XRectangle * r) {
|
||||
|
@ -4,7 +4,9 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <X11/keysym.h>
|
||||
#include "wmii.h"
|
||||
#include <util.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
void
|
||||
init_lock_keys() {
|
||||
|
@ -9,12 +9,15 @@
|
||||
#include <locale.h>
|
||||
#include <pwd.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include "wmii.h"
|
||||
#include <util.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
static const char
|
||||
version[] = "wmii-"VERSION", ©2007 Kris Maglione\n";
|
||||
@ -568,6 +571,7 @@ main(int argc, char *argv[]) {
|
||||
check_x_event(nil);
|
||||
errstr = ixp_serverloop(&srv);
|
||||
if(errstr)
|
||||
fprintf(stderr, "%s: error: %s\n", argv0, errstr);
|
||||
|
||||
cleanup();
|
||||
XCloseDisplay(blz.dpy);
|
||||
|
@ -3,7 +3,9 @@
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "wmii.h"
|
||||
#include <util.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
enum {
|
||||
ButtonMask =
|
||||
|
@ -46,7 +46,9 @@ can get it touch with me at the following location:
|
||||
#include <stdio.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/Xproto.h>
|
||||
#include "wmii.h"
|
||||
#include <util.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
#include "printevent.h"
|
||||
|
||||
static char* sep = " ";
|
||||
|
@ -5,7 +5,9 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "wmii.h"
|
||||
#include <util.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
/* basic rule matching language /regex/ -> value
|
||||
* regex might contain POSIX regex syntax defined in regex(3) */
|
||||
|
@ -3,8 +3,11 @@
|
||||
* See LICENSE file for license details.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "wmii.h"
|
||||
#include <util.h>
|
||||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
static Bool
|
||||
is_empty(View *v) {
|
||||
|
@ -1,3 +1,26 @@
|
||||
#define nil ((void*)0)
|
||||
#define nelem(ary) (sizeof(ary) / sizeof(*ary))
|
||||
|
||||
/* Types */
|
||||
#undef uchar
|
||||
#undef ushort
|
||||
#undef uint
|
||||
#undef ulong
|
||||
#undef uvlong
|
||||
#undef vlong
|
||||
#define uchar _wmiiuchar
|
||||
#define ushort _wmiiushort
|
||||
#define uint _wmiiuint
|
||||
#define ulong _wmiiulong
|
||||
#define vlong _wmiivlong
|
||||
#define uvlong _wmiiuvlong
|
||||
typedef unsigned char uchar;
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned int uint;
|
||||
typedef unsigned long ulong;
|
||||
typedef unsigned long long uvlong;
|
||||
typedef long long vlong;
|
||||
|
||||
#define strlcat wmii_strlcat
|
||||
/* util.c */
|
||||
uint tokenize(char *res[], uint reslen, char *str, char delim);
|
||||
|
@ -6,7 +6,7 @@ TARG = wmii.1 \
|
||||
wmiir.1 \
|
||||
wmiiwm.1
|
||||
|
||||
FILTER = sed "s|CONFPREFIX|${CONFPREFIX}|g; \
|
||||
FILTER = sed "s|CONFPREFIX|${MAN}|g; \
|
||||
s|CONFVERSION|${CONFVERSION}|g; \
|
||||
s|P9PATHS|${P9PATHS}|g; \
|
||||
s|AWKPATH|${AWKPATH}|g"
|
||||
|
@ -11,6 +11,7 @@ mkdirs:
|
||||
done
|
||||
|
||||
install: ${HFILES:.h=.install}
|
||||
uninstall: ${HFILES:.h=.uninstall}
|
||||
|
||||
cleandep:
|
||||
rm .depend 2>/dev/null || true
|
||||
|
@ -16,6 +16,12 @@ dinstall:
|
||||
echo MAKE install ${BASE}$$i/; \
|
||||
(cd $$i && ${MAKE} BASE="${BASE}$$i/" install) || exit $?; \
|
||||
done
|
||||
duninstall:
|
||||
for i in ${DIRS}; do \
|
||||
if [ ! -d $$i ]; then echo Skipping nonexistent directory: $$i 1>&2; continue; fi; \
|
||||
echo MAKE uninstall ${BASE}$$i/; \
|
||||
(cd $$i && ${MAKE} BASE="${BASE}$$i/" uninstall) || exit $?; \
|
||||
done
|
||||
ddepend:
|
||||
for i in ${DIRS}; do \
|
||||
if [ ! -d $$i ]; then echo Skipping nonexistent directory: $$i 1>&2; continue; fi; \
|
||||
@ -26,4 +32,5 @@ ddepend:
|
||||
all: dall
|
||||
clean: dclean
|
||||
install: dinstall
|
||||
uninstall: duninstall
|
||||
depend: ddepend
|
||||
|
33
mk/hdr.mk
33
mk/hdr.mk
@ -1,47 +1,66 @@
|
||||
.SILENT:
|
||||
.SUFFIXES: .O .o .c .sh .rc .awk .1 .depend .install .clean
|
||||
.SUFFIXES: .O .o .c .sh .rc .awk .1 .depend .install .uninstall .clean
|
||||
all:
|
||||
|
||||
.c.o:
|
||||
${COMPILE} $@ $<
|
||||
|
||||
.c.depend:
|
||||
${DEPEND} $< >>.depend
|
||||
|
||||
.c.o:
|
||||
${COMPILE} $@ $<
|
||||
|
||||
.o.O:
|
||||
${LINK} $@ $<
|
||||
|
||||
.c.O:
|
||||
${COMPILE} $@ $<
|
||||
${LINK} $@ $<
|
||||
|
||||
.awk.O:
|
||||
echo FILTER ${BASE}$<
|
||||
${FILTER} $< >$@
|
||||
chmod 0755 $@
|
||||
|
||||
.rc.O:
|
||||
echo FILTER ${BASE}$<
|
||||
${FILTER} $< >$@
|
||||
chmod 0755 $@
|
||||
|
||||
.sh.O:
|
||||
echo FILTER ${BASE}$<
|
||||
${FILTER} $< >$@
|
||||
chmod 0755 $@
|
||||
|
||||
.O.install:
|
||||
echo INSTALL $*
|
||||
echo INSTALL ${BASE}$*
|
||||
cp -f $< ${BIN}/$*
|
||||
chmod 0755 ${BIN}/$*
|
||||
.O.uninstall:
|
||||
echo UNINSTALL ${BASE}$*
|
||||
rm -f ${BIN}/$*
|
||||
|
||||
.a.install:
|
||||
echo INSTALL $<
|
||||
echo INSTALL ${BASE}$<
|
||||
cp -f $< ${LIBDIR}/$<
|
||||
chmod 0644 ${LIBDIR}/$<
|
||||
.a.uninstall:
|
||||
echo UNINSTALL ${BASE}$<
|
||||
rm -f ${LIBDIR}/$<
|
||||
|
||||
.h.install:
|
||||
echo INSTALL $<
|
||||
echo INSTALL ${BASE}$<
|
||||
cp -f $< ${INCLUDE}/$<
|
||||
chmod 0644 ${INCLUDE}/$<
|
||||
.h.uninstall:
|
||||
echo UNINSTALL ${BASE}$<
|
||||
rm -f ${INCLUDE}/$<
|
||||
|
||||
.1.install:
|
||||
echo INSTALL man $*'(1)'
|
||||
${FILTER} $< >${MAN}/man1/$<
|
||||
chmod 0644 ${MAN}/man1/$<
|
||||
.1.uninstall:
|
||||
echo UNINSTALL man $*'(1)'
|
||||
rm -f ${MAN}/man1/$<
|
||||
|
||||
.O.clean:
|
||||
rm $< || true 2>/dev/null
|
||||
|
@ -4,6 +4,7 @@ OFILES = ${OBJ:=.o}
|
||||
all: ${HFILES} ${LIB}
|
||||
|
||||
install: ${TARG}.install
|
||||
uninstall: ${TARG}.uninstall
|
||||
clean: libclean
|
||||
depend: ${OBJ:=.depend}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
install: ${TARG:.1=.install}
|
||||
uninstall: ${TARG:.1=.uninstall}
|
||||
|
||||
printinstall:
|
||||
echo 'Install directories:'
|
||||
|
@ -1,8 +1,9 @@
|
||||
PROGS = ${TARG:=.O}
|
||||
|
||||
all: ${PROGS}
|
||||
all: ${OFILES} ${PROGS}
|
||||
|
||||
install: ${TARG:=.install}
|
||||
uninstall: ${TARG:=.uninstall}
|
||||
clean: manyclean
|
||||
|
||||
printinstall:
|
||||
@ -10,8 +11,8 @@ printinstall:
|
||||
echo ' Bin: ${BIN}'
|
||||
|
||||
manyclean:
|
||||
for i in ${TARG}; do \
|
||||
rm $$i.o; rm $$i.O; \
|
||||
for i in ${TARG:=.o} ${TARG:=.O} ${OFILES}; do \
|
||||
rm $$i; \
|
||||
done 2>/dev/null || true
|
||||
|
||||
include ${ROOT}/mk/common.mk
|
||||
|
@ -4,6 +4,7 @@ OFILES = ${OBJ:=.o}
|
||||
all: ${PROG}
|
||||
|
||||
install: ${TARG}.install
|
||||
uninstall: ${TARG}.uninstall
|
||||
clean: oneclean
|
||||
depend: ${OBJ:=.depend}
|
||||
|
||||
|
@ -11,7 +11,7 @@ $CC -o $outfile $CFLAGS $@ 2>$xtmp
|
||||
status=$?
|
||||
|
||||
cat $xtmp \
|
||||
| egrep -v ': error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level:|support .long long.|In file included from| from|use of C99 long long|ISO C forbids conversion' \
|
||||
| egrep -v ': error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level:|support .long long.|use of C99 long long|ISO C forbids conversion' \
|
||||
| sed 's/ .first use in this function.$//; s/\"\([^\"][^\"]*\)\", line \([0-9][0-9]*\)/\1:\2/g' \
|
||||
| uniq 1>&2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user