X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=0c546e361912df0a76f2d023b4cdbc99194e3a63;hb=bc7bd41556e1fd137acf4df415e5dc0f6d5e02c4;hp=7f3d2519383feb31c25a89a6781aaa28fe149abf;hpb=e70e20fdbececafef842ec7b330fd48db42e614e;p=plcapi.git diff --git a/Makefile b/Makefile index 7f3d251..0c546e3 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,6 @@ # starting with 5.0, support for these two modules is taken out # Other stuff - doc not implicit, it's redone by myplc-docs -subdirs := php/xmlrpc # autoconf compatible variables DESTDIR := / @@ -19,24 +18,26 @@ bindir := /usr/bin PWD := $(shell pwd) -all: $(subdirs) - python setup.py build +all: + python3 setup.py build -install: - python setup.py install \ +install: install-python install-phpxmlrpc + +install-python: + python3 setup.py install \ --install-purelib=$(DESTDIR)/$(datadir)/plc_api \ --install-scripts=$(DESTDIR)/$(datadir)/plc_api \ --install-data=$(DESTDIR)/$(datadir)/plc_api - install -D -m 755 php/xmlrpc/xmlrpc.so $(DESTDIR)/$(shell php-config --extension-dir)/xmlrpc.so -$(subdirs): %: - $(MAKE) -C $@ +# phpxmlrpc is a git subtree; we just ship all its contents +# under /usr/share/plc_api/php/phpxmlrpc +install-phpxmlrpc: + mkdir -p $(DESTDIR)/$(datadir)/plc_api/php/phpxmlrpc/ + rsync --exclude .git -ai php/phpxmlrpc/ $(DESTDIR)/$(datadir)/plc_api/php/phpxmlrpc/ -clean: +clean: find . -name '*.pyc' | xargs rm -f - rm -f $(INIT) - for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir clean ; done - python setup.py clean && rm -rf build + python3 setup.py clean && rm -rf build index: echo "This step is obsolete" @@ -45,7 +46,7 @@ index: force: -.PHONY: all install force clean index tags $(subdirs) +.PHONY: all install force clean index tags #################### devel tools tags: @@ -72,9 +73,9 @@ endif endif LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' --exclude Accessors_site.py -RSYNC_EXCLUDES := --exclude .svn --exclude .git --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES) +RSYNC_EXCLUDES := --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES) RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,) -RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES) +RSYNC := rsync -ai $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES) sync: ifeq (,$(SSHURL)) @@ -83,12 +84,11 @@ ifeq (,$(SSHURL)) @echo " make sync PLCHOSTLXC=.. GUESTHOSTNAME=.. GUESTNAME=.." @exit 1 else - +$(RSYNC) plcsh PLC planetlab5.sql migrations aspects $(SSHURL)/usr/share/plc_api/ + +$(RSYNC) plcsh PLC planetlab5.sql migrations php $(SSHURL)/usr/share/plc_api/ +$(RSYNC) db-config.d/ $(SSHURL)/etc/planetlab/db-config.d/ +$(RSYNC) plc.d/ $(SSHURL)/etc/plc.d/ +$(RSYNC) apache/plc.wsgi $(SSHURL)/usr/share/plc_api/apache/ - $(SSHCOMMAND) /etc/plc.d/httpd stop - $(SSHCOMMAND) /etc/plc.d/httpd start + $(SSHCOMMAND) systemctl restart plc endif #################### convenience, for debugging only @@ -100,4 +100,3 @@ endif +%: varname=$(subst +,,$@) +%: @echo "$($(varname))" -