--- projects/cms/source/host/ihost-perl/Makefile 2001/11/19 21:53:14 1.5 +++ projects/cms/source/host/ihost-perl/Makefile 2002/03/08 15:35:16 1.6 @@ -1,20 +1,40 @@ # Makefile for ihost -# $Id: Makefile,v 1.5 2001/11/19 21:53:14 tdb Exp $ +# $Id: Makefile,v 1.6 2002/03/08 15:35:16 tdb Exp $ include Config.inc # these files and directories will be included in the distribution -FILES = README ihost.pl ihostchk.sh plugins +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 + +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) + dist: cp -R $(FILES) $(BUILDDIR) -# # messy :( - rm -Rf $(BUILDDIR)/plugins/CVS - cd $(BUILDDIR) && tar -cvf $(TARFILE) $(FILES) + cd $(BUILDDIR) && tar -cvf $(TARFILE) $(FILES) $(PLUGINSDIR) cd $(BUILDDIR) && gzip -fv9 $(TARFILE) - cd $(BUILDDIR) && rm -Rf $(FILES) + cd $(BUILDDIR) && rm -Rf $(FILES) $(PLUGINSDIR) cvsbuild: mkdir -p $(CVSBUILDTEMP) @@ -27,11 +47,12 @@ clean: 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 + update: $(CVS) -q -d $(CVSROOT) update - -# for compatibility with other scripts -distclean: clean