# Fungimol - an extensible system for designing atomic-scale objects.
# Copyright (C) 2000 Tim Freeman
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
# 
# You should have received a copy of the GNU Library General Public
# License along with this library in the file COPYING.txt; if not,
# write to the Free Software Foundation, Inc., 59 Temple Place -
# Suite 330, Boston, MA 02111-1307, USA
#
# The author can be reached by email at tim@infoscreen.com, or by
# paper mail at:
#
# Tim Freeman
# 655 S. FairOaks Ave., Apt B-316
# Sunnyvale, CA 94086
#
ifeq ($(DOCHOME),)
   -include stopNOHOME
   .PHONY:stopNOHOME
   stopNOHOME:
	@echo DOCHOME must be set before invoking this Makefile.
	@exit 1
endif
ifeq ($(INSTALL),)
   -include stopNOINSTALL
   .PHONY:stopNOINSTALL
   stopNOINSTALL:
	@echo INSTALL should be set before invoking this Makefile.
	@exit 1
endif
GALHOME:=$(DOCHOME)/gallery
SUBDIRS:=$(shell find . -type d '!' -path '*/CVS*')
.PHONY:install
install:
	$(INSTALL) 0755 -d $(GALHOME) $(foreach p,$(SUBDIRS),$(GALHOME)/$(p))
	$(INSTALL) 0444 `/bin/csh -fc 'set nonoglob; echo *.html *.gif *.pdb'` $(GALHOME)
	$(foreach p,$(SUBDIRS),\
	  $(INSTALL) 0444 `/bin/csh -fc 'set nonoglob; echo $(p)/*.html $(p)/*.gif $(p)/*.pdb'` $(GALHOME)/$(p) && ) true

clean:
	-rm *~
