From 52a21b415ad95b2c4649254447388cb329cee1a4 Mon Sep 17 00:00:00 2001 From: "Andrew Gallant (Ocelot)" Date: Sat, 28 Apr 2012 23:25:57 -0400 Subject: initial commit. not currently in a working state. --- nexgb/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 nexgb/Makefile (limited to 'nexgb/Makefile') diff --git a/nexgb/Makefile b/nexgb/Makefile new file mode 100644 index 0000000..041d20c --- /dev/null +++ b/nexgb/Makefile @@ -0,0 +1,19 @@ +XPROTO=/usr/share/xcb +all: xproto xinerama + +xproto: + python2 go_client.py $(XPROTO)/xproto.xml + gofmt -w xproto.go + +xinerama: + python2 go_client.py $(XPROTO)/xinerama.xml + gofmt -w xinerama.go + +randr: + python2 go_client.py $(XPROTO)/randr.xml + gofmt -w randr.go + +render: + python2 go_client.py $(XPROTO)/render.xml + gofmt -w render.go + -- cgit v1.2.3 From 70ebcf5178018a31378367f67542fc89980e62a2 Mon Sep 17 00:00:00 2001 From: "Andrew Gallant (Ocelot)" Date: Sun, 6 May 2012 03:06:27 -0400 Subject: build comman for converting XML to Go --- nexgb/Makefile | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'nexgb/Makefile') diff --git a/nexgb/Makefile b/nexgb/Makefile index 041d20c..b1ef0ca 100644 --- a/nexgb/Makefile +++ b/nexgb/Makefile @@ -1,19 +1,16 @@ -XPROTO=/usr/share/xcb -all: xproto xinerama - -xproto: - python2 go_client.py $(XPROTO)/xproto.xml - gofmt -w xproto.go +# This Makefile is used by the developer. It is not needed in any way to build +# a checkout of the XGB repository. -xinerama: - python2 go_client.py $(XPROTO)/xinerama.xml - gofmt -w xinerama.go +XPROTO=/usr/share/xcb -randr: - python2 go_client.py $(XPROTO)/randr.xml - gofmt -w randr.go +# All of the XML files in my /usr/share/xcb directory EXCEPT XKB. -_- +all: bigreq.xml composite.xml damage.xml dpms.xml dri2.xml \ + ge.xml glx.xml randr.xml record.xml render.xml res.xml \ + screensaver.xml shape.xml shm.xml sync.xml xc_misc.xml \ + xevie.xml xf86dri.xml xf86vidmode.xml xfixes.xml xinerama.xml \ + xinput.xml xprint.xml xproto.xml xselinux.xml xtest.xml \ + xvmc.xml xv.xml -render: - python2 go_client.py $(XPROTO)/render.xml - gofmt -w render.go +%.xml: + xgbgen/xgbgen --proto-path $(XPROTO) $(XPROTO)/$*.xml > auto_$*.go -- cgit v1.2.3 From fd30f1512a713ae5b3cbacddfe9f29dfccc82047 Mon Sep 17 00:00:00 2001 From: "Andrew Gallant (Ocelot)" Date: Mon, 7 May 2012 01:00:45 -0400 Subject: added tests --- nexgb/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'nexgb/Makefile') diff --git a/nexgb/Makefile b/nexgb/Makefile index b1ef0ca..c70b01c 100644 --- a/nexgb/Makefile +++ b/nexgb/Makefile @@ -14,3 +14,9 @@ all: bigreq.xml composite.xml damage.xml dpms.xml dri2.xml \ %.xml: xgbgen/xgbgen --proto-path $(XPROTO) $(XPROTO)/$*.xml > auto_$*.go +test: + go test + +bench: + go test -run 'nomatch' -bench '.*' -cpu 1,2,6 + -- cgit v1.2.3 From dc48249e1acea54b391f53b95f16e515dead7c97 Mon Sep 17 00:00:00 2001 From: "Andrew Gallant (Ocelot)" Date: Mon, 7 May 2012 04:09:19 -0400 Subject: lots of docs and examples --- nexgb/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'nexgb/Makefile') diff --git a/nexgb/Makefile b/nexgb/Makefile index c70b01c..7ba1cb4 100644 --- a/nexgb/Makefile +++ b/nexgb/Makefile @@ -1,5 +1,6 @@ # This Makefile is used by the developer. It is not needed in any way to build # a checkout of the XGB repository. +# It will be useful, however, if you are hacking at the code generator. XPROTO=/usr/share/xcb @@ -20,3 +21,8 @@ test: bench: go test -run 'nomatch' -bench '.*' -cpu 1,2,6 +gofmt: + gofmt -w *.go xgbgen/*.go examples/*.go examples/*/*.go + colcheck xgbgen/*.go examples/*.go examples/*/*.go \ + auth.go conn.go cookie.go doc.go xgb.go xgb_help.go xgb_test.go + -- cgit v1.2.3 From 13d598e5e7f26bc6177ae3f7d52f4f19729ab2f3 Mon Sep 17 00:00:00 2001 From: "Andrew Gallant (Ocelot)" Date: Mon, 7 May 2012 21:58:33 -0400 Subject: more clean up. use log instead of fmt.Print to stderr. bug fix for event blocking (a hack fix for now). --- nexgb/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'nexgb/Makefile') diff --git a/nexgb/Makefile b/nexgb/Makefile index 7ba1cb4..56738f4 100644 --- a/nexgb/Makefile +++ b/nexgb/Makefile @@ -5,13 +5,17 @@ XPROTO=/usr/share/xcb # All of the XML files in my /usr/share/xcb directory EXCEPT XKB. -_- -all: bigreq.xml composite.xml damage.xml dpms.xml dri2.xml \ +all: build-xgbgen \ + bigreq.xml composite.xml damage.xml dpms.xml dri2.xml \ ge.xml glx.xml randr.xml record.xml render.xml res.xml \ screensaver.xml shape.xml shm.xml sync.xml xc_misc.xml \ xevie.xml xf86dri.xml xf86vidmode.xml xfixes.xml xinerama.xml \ xinput.xml xprint.xml xproto.xml xselinux.xml xtest.xml \ xvmc.xml xv.xml +build-xgbgen: + (cd xgbgen && go build) + %.xml: xgbgen/xgbgen --proto-path $(XPROTO) $(XPROTO)/$*.xml > auto_$*.go -- cgit v1.2.3 From 0c50dc6241fa21712e041cfa2bfb9db4ccaef10a Mon Sep 17 00:00:00 2001 From: "Andrew Gallant (Ocelot)" Date: Thu, 10 May 2012 17:01:42 -0400 Subject: a huge commit. splitting extensions into their own sub-packages. --- nexgb/Makefile | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'nexgb/Makefile') diff --git a/nexgb/Makefile b/nexgb/Makefile index 56738f4..7fa8b9b 100644 --- a/nexgb/Makefile +++ b/nexgb/Makefile @@ -16,17 +16,30 @@ all: build-xgbgen \ build-xgbgen: (cd xgbgen && go build) -%.xml: - xgbgen/xgbgen --proto-path $(XPROTO) $(XPROTO)/$*.xml > auto_$*.go +build-all: bigreq.b composite.b damage.b dpms.b dri2.b ge.b glx.b randr.b \ + record.b render.b res.b screensaver.b shape.b shm.b sync.b xcmisc.b \ + xevie.b xf86dri.b xf86vidmode.b xfixes.b xinerama.b xinput.b \ + xprint.b xproto.b xselinux.b xtest.b xv.b xvmc.b + +%.b: + (cd $* ; go build) + +xc_misc.xml: build-xgbgen + mkdir -p xcmisc + xgbgen/xgbgen --proto-path $(XPROTO) $(XPROTO)/xc_misc.xml > xcmisc/xcmisc.go + +%.xml: build-xgbgen + mkdir -p $* + xgbgen/xgbgen --proto-path $(XPROTO) $(XPROTO)/$*.xml > $*/$*.go test: - go test + (cd xproto ; go test) bench: - go test -run 'nomatch' -bench '.*' -cpu 1,2,6 + (cd xproto ; go test -run 'nomatch' -bench '.*' -cpu 1,2,6) gofmt: gofmt -w *.go xgbgen/*.go examples/*.go examples/*/*.go - colcheck xgbgen/*.go examples/*.go examples/*/*.go \ - auth.go conn.go cookie.go doc.go xgb.go xgb_help.go xgb_test.go + colcheck xgbgen/*.go examples/*.go examples/*/*.go xproto/xproto_test.go \ + auth.go conn.go cookie.go doc.go xgb.go xgb_help.go -- cgit v1.2.3 From f77feff864545c590ad4f717ecf47278703e1792 Mon Sep 17 00:00:00 2001 From: "Andrew Gallant (Ocelot)" Date: Sat, 12 May 2012 21:27:47 -0400 Subject: some docs in the Makefile and removing a prefix that isn't needed. --- nexgb/Makefile | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'nexgb/Makefile') diff --git a/nexgb/Makefile b/nexgb/Makefile index 7fa8b9b..6809661 100644 --- a/nexgb/Makefile +++ b/nexgb/Makefile @@ -1,10 +1,20 @@ # This Makefile is used by the developer. It is not needed in any way to build # a checkout of the XGB repository. # It will be useful, however, if you are hacking at the code generator. +# i.e., after making a change to the code generator, run 'make' in the +# xgb directory. This will build xgbgen and regenerate each sub-package. +# 'make test' will then run any appropriate tests (just tests xproto right now). +# 'make bench' will test a couple of benchmarks. +# 'make build-all' will then try to build each extension. This isn't strictly +# necessary, but it's a good idea to make sure each sub-package is a valid +# Go package. +# My path to the X protocol XML descriptions. XPROTO=/usr/share/xcb # All of the XML files in my /usr/share/xcb directory EXCEPT XKB. -_- +# This is intended to build xgbgen and generate Go code for each supported +# extension. all: build-xgbgen \ bigreq.xml composite.xml damage.xml dpms.xml dri2.xml \ ge.xml glx.xml randr.xml record.xml render.xml res.xml \ @@ -16,6 +26,7 @@ all: build-xgbgen \ build-xgbgen: (cd xgbgen && go build) +# Builds each individual sub-package to make sure its valid Go code. build-all: bigreq.b composite.b damage.b dpms.b dri2.b ge.b glx.b randr.b \ record.b render.b res.b screensaver.b shape.b shm.b sync.b xcmisc.b \ xevie.b xf86dri.b xf86vidmode.b xfixes.b xinerama.b xinput.b \ @@ -24,6 +35,8 @@ build-all: bigreq.b composite.b damage.b dpms.b dri2.b ge.b glx.b randr.b \ %.b: (cd $* ; go build) +# xc_misc is special because it has an underscore. +# There's probably a way to do this better, but Makefiles aren't my strong suit. xc_misc.xml: build-xgbgen mkdir -p xcmisc xgbgen/xgbgen --proto-path $(XPROTO) $(XPROTO)/xc_misc.xml > xcmisc/xcmisc.go @@ -32,14 +45,20 @@ xc_misc.xml: build-xgbgen mkdir -p $* xgbgen/xgbgen --proto-path $(XPROTO) $(XPROTO)/$*.xml > $*/$*.go +# Just test the xproto core protocol for now. test: (cd xproto ; go test) +# Force all xproto benchmarks to run and no tests. bench: (cd xproto ; go test -run 'nomatch' -bench '.*' -cpu 1,2,6) +# gofmt all non-auto-generated code. +# (auto-generated code is already gofmt'd.) +# Also do a column check (80 cols) after a gofmt. +# But don't check columns on auto-generated code, since I don't care if they +# break 80 cols. gofmt: - gofmt -w *.go xgbgen/*.go examples/*.go examples/*/*.go - colcheck xgbgen/*.go examples/*.go examples/*/*.go xproto/xproto_test.go \ - auth.go conn.go cookie.go doc.go xgb.go xgb_help.go + gofmt -w *.go xgbgen/*.go examples/*.go examples/*/*.go xproto/xproto_test.go + colcheck *.go xgbgen/*.go examples/*.go examples/*/*.go xproto/xproto_test.go -- cgit v1.2.3 From 744c9688cc58cbf83415439e281c9aa2825fd7f7 Mon Sep 17 00:00:00 2001 From: "Andrew Gallant (Ocelot)" Date: Sat, 2 Jun 2012 12:59:53 -0400 Subject: Benchmark with gomaxprocs=3 too --- nexgb/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nexgb/Makefile') diff --git a/nexgb/Makefile b/nexgb/Makefile index 6809661..f32e824 100644 --- a/nexgb/Makefile +++ b/nexgb/Makefile @@ -51,7 +51,7 @@ test: # Force all xproto benchmarks to run and no tests. bench: - (cd xproto ; go test -run 'nomatch' -bench '.*' -cpu 1,2,6) + (cd xproto ; go test -run 'nomatch' -bench '.*' -cpu 1,2,3,6) # gofmt all non-auto-generated code. # (auto-generated code is already gofmt'd.) -- cgit v1.2.3 From 22ceab8074f24734de307ace4753728142240d65 Mon Sep 17 00:00:00 2001 From: "Andrew Gallant (Ocelot)" Date: Tue, 5 Jun 2012 00:14:07 -0400 Subject: Add rules for installing all packages. --- nexgb/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'nexgb/Makefile') diff --git a/nexgb/Makefile b/nexgb/Makefile index f32e824..953b100 100644 --- a/nexgb/Makefile +++ b/nexgb/Makefile @@ -35,6 +35,16 @@ build-all: bigreq.b composite.b damage.b dpms.b dri2.b ge.b glx.b randr.b \ %.b: (cd $* ; go build) +# Installs each individual sub-package. +install: bigreq.i composite.i damage.i dpms.i dri2.i ge.i glx.i randr.i \ + record.i render.i res.i screensaver.i shape.i shm.i sync.i xcmisc.i \ + xevie.i xf86dri.i xf86vidmode.i xfixes.i xinerama.i xinput.i \ + xprint.i xproto.i xselinux.i xtest.i xv.i xvmc.i + go install + +%.i: + (cd $* ; go install) + # xc_misc is special because it has an underscore. # There's probably a way to do this better, but Makefiles aren't my strong suit. xc_misc.xml: build-xgbgen -- cgit v1.2.3 From 3b4adabee14855e6ce5345567ceeb566917625be Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Sat, 28 Dec 2013 09:22:33 -0500 Subject: The `sync` and `xinput` extensions now use the `switch` field, which XGB does not currently support. Therefore, I'm removing the sync and xinput extensions. This affects issues #11 and #13. --- nexgb/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'nexgb/Makefile') diff --git a/nexgb/Makefile b/nexgb/Makefile index 953b100..57e884a 100644 --- a/nexgb/Makefile +++ b/nexgb/Makefile @@ -18,9 +18,9 @@ XPROTO=/usr/share/xcb all: build-xgbgen \ bigreq.xml composite.xml damage.xml dpms.xml dri2.xml \ ge.xml glx.xml randr.xml record.xml render.xml res.xml \ - screensaver.xml shape.xml shm.xml sync.xml xc_misc.xml \ + screensaver.xml shape.xml shm.xml xc_misc.xml \ xevie.xml xf86dri.xml xf86vidmode.xml xfixes.xml xinerama.xml \ - xinput.xml xprint.xml xproto.xml xselinux.xml xtest.xml \ + xprint.xml xproto.xml xselinux.xml xtest.xml \ xvmc.xml xv.xml build-xgbgen: @@ -28,8 +28,8 @@ build-xgbgen: # Builds each individual sub-package to make sure its valid Go code. build-all: bigreq.b composite.b damage.b dpms.b dri2.b ge.b glx.b randr.b \ - record.b render.b res.b screensaver.b shape.b shm.b sync.b xcmisc.b \ - xevie.b xf86dri.b xf86vidmode.b xfixes.b xinerama.b xinput.b \ + record.b render.b res.b screensaver.b shape.b shm.b xcmisc.b \ + xevie.b xf86dri.b xf86vidmode.b xfixes.b xinerama.b \ xprint.b xproto.b xselinux.b xtest.b xv.b xvmc.b %.b: @@ -37,8 +37,8 @@ build-all: bigreq.b composite.b damage.b dpms.b dri2.b ge.b glx.b randr.b \ # Installs each individual sub-package. install: bigreq.i composite.i damage.i dpms.i dri2.i ge.i glx.i randr.i \ - record.i render.i res.i screensaver.i shape.i shm.i sync.i xcmisc.i \ - xevie.i xf86dri.i xf86vidmode.i xfixes.i xinerama.i xinput.i \ + record.i render.i res.i screensaver.i shape.i shm.i xcmisc.i \ + xevie.i xf86dri.i xf86vidmode.i xfixes.i xinerama.i \ xprint.i xproto.i xselinux.i xtest.i xv.i xvmc.i go install -- cgit v1.2.3 From ad9c35a02f190ea5da59c9c4a3aeddcf7e8a5c1f Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Sat, 28 Dec 2013 09:33:40 -0500 Subject: shortcuts for the lazy --- nexgb/Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nexgb/Makefile') diff --git a/nexgb/Makefile b/nexgb/Makefile index 57e884a..7a3dae2 100644 --- a/nexgb/Makefile +++ b/nexgb/Makefile @@ -72,3 +72,7 @@ gofmt: gofmt -w *.go xgbgen/*.go examples/*.go examples/*/*.go xproto/xproto_test.go colcheck *.go xgbgen/*.go examples/*.go examples/*/*.go xproto/xproto_test.go +push: + git push origin master + git push github master + -- cgit v1.2.3 From a102c4056f6b01035772cf79060012ff800c9669 Mon Sep 17 00:00:00 2001 From: aarzilli Date: Wed, 18 Jan 2017 09:50:29 +0100 Subject: Makefile: do not redefine $XPROTO if it's already defined. --- nexgb/Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nexgb/Makefile') diff --git a/nexgb/Makefile b/nexgb/Makefile index 7a3dae2..c0ee531 100644 --- a/nexgb/Makefile +++ b/nexgb/Makefile @@ -10,7 +10,9 @@ # Go package. # My path to the X protocol XML descriptions. +ifndef XPROTO XPROTO=/usr/share/xcb +endif # All of the XML files in my /usr/share/xcb directory EXCEPT XKB. -_- # This is intended to build xgbgen and generate Go code for each supported -- cgit v1.2.3