--- projects/cms/source/host/ihost-perl/Makefile 2001/03/26 17:02:20 1.4 +++ projects/cms/source/host/ihost-perl/Makefile 2002/03/19 10:45:30 1.7 @@ -1,38 +1,65 @@ # Makefile for ihost -# $Id: Makefile,v 1.4 2001/03/26 17:02:20 tdb Exp $ +# $Id: Makefile,v 1.7 2002/03/19 10:45:30 tdb Exp $ include Config.inc -# these files will be included in the distribution -FILESRC = README ihost.pl ../generic/statgrab.pl ihostchk.sh -FILES = README ihost.pl statgrab.pl ihostchk.sh +# these files and directories will be included in the distribution +FILES = README ihost.pl ihostchk.sh +# where the plugins will be located +PLUGINSDIR = plugins -all: dist +# make the default perl, it's cross platform +all: perl +# build the relevent plugin, then make the distribution +perl: build-perl dist +linux: build-linux dist +solaris: build-solaris dist +freebsd: build-freebsd dist + +build-perl: + mkdir -p $(BUILDDIR)/$(PLUGINSDIR) + cp -R $(PERLPLUGINS)/*.pl $(BUILDDIR)/$(PLUGINSDIR) + +build-linux: + cd $(LINUXPLUGINS) && $(MAKE) linux + mkdir -p $(BUILDDIR)/$(PLUGINSDIR) + cp $(LINUXPLUGINS)/linux $(BUILDDIR)/$(PLUGINSDIR) + +build-solaris: + cd $(SOLARISPLUGINS) && $(MAKE) solaris + mkdir -p $(BUILDDIR)/$(PLUGINSDIR) + cp $(SOLARISPLUGINS)/solaris $(BUILDDIR)/$(PLUGINSDIR) + +build-freebsd: + cd $(FREEBSDPLUGINS) && $(MAKE) freebsd + mkdir -p $(BUILDDIR)/$(PLUGINSDIR) + cp $(FREEBSDPLUGINS)/freebsd $(BUILDDIR)/$(PLUGINSDIR) + dist: - cp $(FILESRC) $(BUILDDIR) - cd $(BUILDDIR) && tar -cvf $(TARFILE) $(FILES) + cp -R $(FILES) $(BUILDDIR) + cd $(BUILDDIR) && tar -cvf $(TARFILE) $(FILES) $(PLUGINSDIR) cd $(BUILDDIR) && gzip -fv9 $(TARFILE) - cd $(BUILDDIR) && rm $(FILES) + cd $(BUILDDIR) && rm -Rf $(FILES) $(PLUGINSDIR) cvsbuild: - mkdir -p $(CVSBUILDTEMP)/$(IHOST) - mkdir -p $(CVSBUILDTEMP)/$(STATGRAB) - $(CVS) -d $(CVSROOT) export -r $(REVISION) -d $(CVSBUILDTEMP)/$(IHOST) $(IHOSTMODULE) - $(CVS) -d $(CVSROOT) export -r $(REVISION) -d $(CVSBUILDTEMP)/$(STATGRAB) $(STATGRABMODULE) - cd $(CVSBUILDTEMP)/$(IHOST) && $(MAKE) dist - cp $(CVSBUILDTEMP)/$(IHOST)/$(BUILDDIR)/$(TARGZFILE) $(BUILDDIR)/$(ARCNAME)-$(REVISION)$(TARGZEXT) + mkdir -p $(CVSBUILDTEMP) + $(CVS) -d $(CVSROOT) export -r $(REVISION) -d $(CVSBUILDTEMP) $(CVSMODULE) + cd $(CVSBUILDTEMP) && $(MAKE) dist + cp $(CVSBUILDTEMP)/$(BUILDDIR)/$(TARGZFILE) $(BUILDDIR)/$(ARCNAME)-$(REVISION)$(TARGZEXT) clean: rm -Rf $(BUILDDIR)/$(TARFILE) rm -Rf $(BUILDDIR)/$(TARGZFILE) rm -Rf $(BUILDDIR)/$(ARCNAME)-*$(TAREXT) rm -Rf $(BUILDDIR)/$(ARCNAME)-*$(TARGZEXT) - cd $(BUILDDIR) && rm -Rf $(FILES) + cd $(BUILDDIR) && rm -Rf $(FILES) $(PLUGINSDIR) rm -Rf $(CVSBUILDTEMP) +distclean: clean + cd $(LINUXPLUGINS) && $(MAKE) clean + cd $(SOLARISPLUGINS) && $(MAKE) clean + cd $(FREEBSDPLUGINS) && $(MAKE) clean + update: $(CVS) -q -d $(CVSROOT) update - -# for compatibility with other scripts -distclean: clean