#-------------------------------------------------------------------- #To make a debugging executable prod \ debug : @ for i in $(SUBDIRS) ; \ do \ echo "Doing: $$i $@"; \ $(MAKE) -C $$i $@ ; \ RETVAL=$$? ; \ if [ $$RETVAL != 0 ] ; then \ exit $$RETVAL ; \ fi ; \ done #To clean distribution clean : @ for i in $(SUBDIRS) ; \ do \ echo "Doing now \"$$i $@\"" ; \ $(MAKE) -s -C $$i $@ ; \ done @ - rm -fr bin #-------------------------------------------------------------------- #installing application install : @ install -d $(DESTDIR)/usr/sbin/ @ install -d $(DESTDIR)/var/lock/$(APPNAME) @ #adding executable @ install app/vzgot $(DESTDIR)/usr/sbin @ mv shell/vzgot.mksrvz $(DESTDIR)/usr/sbin/ @ mv shell/vzgot.redoall $(DESTDIR)/usr/sbin/ @ #adding init file @ install -d $(DESTDIR)/etc/rc.d/init.d @ cp -ap conf/redhat_init.sh $(DESTDIR)/etc/rc.d/init.d/vzgot @ #adding configuration file @ install -d $(DESTDIR)/etc/$(APPNAME) @ install -m 0644 conf/vzgot_config $(DESTDIR)/etc/$(APPNAME) @ install -m 0644 conf/vzgot_list $(DESTDIR)/etc/$(APPNAME) @ install -d $(DESTDIR)/var/lib/$(APPNAME) @ cp -ap etc $(DESTDIR)/var/lib/$(APPNAME) @ install -d $(DESTDIR)/var/lib/$(APPNAME)/etc/ssh @ install -d $(DESTDIR)/var/lib/$(APPNAME)/etc/sysconfig @ install -d $(DESTDIR)/var/lib/$(APPNAME)/home @ cp -ap cgroup.d $(DESTDIR)/var/lib/$(APPNAME) @ #adding template directory @ install -d $(DESTDIR)/var/lib/$(APPNAME)/vztemplate @ #adding special distribution RPM @ cp -ap RPM $(DESTDIR)/var/lib/$(APPNAME) @ install -d $(DESTDIR)/var/lib/$(APPNAME)/vzdir @ #adding application shell script @ install -d $(DESTDIR)/var/lib/$(APPNAME)/shell @ install shell/vzgot.* $(DESTDIR)/var/lib/$(APPNAME)/shell #-------------------------------------------------------------------- SUBDIRS= \ lib app #=================================================================== #all support information .PHONY: clean #-------------------------------------------------------------------- #version management APPNAME=vzgot REVISION="$Revision: 0.84.0.0 $ " DATE="$Date: 2010/03/06 16:39:08 $" VERS=`echo $(REVISION) | cut -d' ' -f 2 | cut -d'.' -f1,2` REL=`echo $(REVISION) | cut -d' ' -f 2 | cut -d'.' -f4` SUBVERS=`echo $(DATE) | cut -d' ' -f2 | tr -d '/'` APLR=$(APPNAME)-$(VERS).$(REL) #--------------------------------------------------------------------