From b68ffc842d9e9db82bec7dfa6850e29d8ecd1202 Mon Sep 17 00:00:00 2001 From: Unbit Date: Mon, 11 Nov 2013 05:44:51 +0100 Subject: [PATCH] prepare for gccgo docs --- Makefile | 5 ++++- plugins/gccgo/uwsgiplugin.py | 9 +++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e5958687..d30cd426 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,13 @@ PYTHON := python all: - $(PYTHON) uwsgiconfig.py --build $(PROFILE) + $(PYTHON) uwsgiconfig.py --build clean: $(PYTHON) uwsgiconfig.py --clean check: $(PYTHON) uwsgiconfig.py --check + +%: + $(PYTHON) uwsgiconfig.py --build $@ diff --git a/plugins/gccgo/uwsgiplugin.py b/plugins/gccgo/uwsgiplugin.py index 147c03f8..cae303b4 100644 --- a/plugins/gccgo/uwsgiplugin.py +++ b/plugins/gccgo/uwsgiplugin.py @@ -6,7 +6,8 @@ LDFLAGS = [] LIBS = ['-lgo'] GCC_LIST = ['gccgo_plugin', 'uwsgi.go'] -#def post_build(config): -# if os.system("objcopy -j .go_export plugins/gccgo/uwsgi.go.o plugins/gccgo/uwsgi.gox") != 0: -# os._exit(1) -# print("*** uwsgi.gox available in %s/plugins/gccgo ***" % os.getcwd()) +def post_build(config): + if os.path.exists('plugins/gccgo/uwsgi.go.o'): + if os.system("objcopy -j .go_export plugins/gccgo/uwsgi.go.o plugins/gccgo/uwsgi.gox") != 0: + os._exit(1) + print("*** uwsgi.gox available in %s/plugins/gccgo ***" % os.getcwd())