# # EMULAB-COPYRIGHT # Copyright (c) 2000-2005 University of Utah and the Flux Group. # All rights reserved. # SRCDIR = @srcdir@ TESTBED_SRCDIR = @top_srcdir@ OBJDIR = .. SUBDIR = www # # A hack for only installing some things if installing on the main site # MAINSITE = emulab.net OURDOMAIN = @OURDOMAIN@ include $(OBJDIR)/Makeconf SUBDIRS = garcia-telemetry # # Force dependencies to make sure configure regenerates if the .in file # is changed. # all: defs.php3 dbdefs.php3 swish.conf websearch xmlrpc.php3 all-subdirs include $(TESTBED_SRCDIR)/GNUmakerules # # Generate a list of all the files we want to install from the current # directory and the source directory. # FILES = $(wildcard *.css *.jpg *.gif *.png *.html *.php3 *.php *.ico *.jar) FILES += $(wildcard $(SRCDIR)/*.css) FILES += $(wildcard $(SRCDIR)/*.jpg) FILES += $(wildcard $(SRCDIR)/*.png) FILES += $(wildcard $(SRCDIR)/*.gif) FILES += $(wildcard $(SRCDIR)/*.html) FILES += $(wildcard $(SRCDIR)/*.php3) FILES += $(wildcard $(SRCDIR)/*.php) FILES += $(wildcard $(SRCDIR)/*.ico) FILES += $(wildcard $(SRCDIR)/*.class) FILES += $(wildcard $(SRCDIR)/*.jar) FILES += $(SRCDIR)/.htaccess $(SRCDIR)/error.shtml \ $(SRCDIR)/ssh-mime.pl $(SRCDIR)/rdp-mime.pl \ $(SRCDIR)/ssh-mime-winxp.pl $(SRCDIR)/rdp-mime-winxp.pl \ $(SRCDIR)/ssh-mime-winxp.c $(SRCDIR)/rdp-mime-winxp.c \ $(SRCDIR)/ssh-mime-winxp.exe $(SRCDIR)/rdp-mime-winxp.exe \ $(SRCDIR)/emulab-mime-winxp.zip $(SRCDIR)/emulab-mime-winxp.reg AUTOICONS = $(wildcard $(SRCDIR)/autostatus-icons/*.gif) AUTOICONS += $(wildcard $(SRCDIR)/autostatus-icons/*.png) FLOORMAPFILES = $(wildcard $(SRCDIR)/floormap/*.jpg) FLOORMAPFILES += $(wildcard $(SRCDIR)/floormap/*.gif) PIXFILES = $(wildcard $(SRCDIR)/pix/*.jpg) PIXFILES += $(wildcard $(SRCDIR)/pix/*.gif) DOCFILES = $(wildcard $(SRCDIR)/doc/*.html) DOCFILES += $(wildcard $(SRCDIR)/doc/*.jpg) DOCFILES += $(wildcard $(SRCDIR)/doc/*.gif) DOCFILES += $(wildcard $(SRCDIR)/doc/*.php3) DOCFILES += $(wildcard $(SRCDIR)/doc/*.php) DOCFILES += $(wildcard $(SRCDIR)/doc/*.ps) DOCFILES += $(wildcard $(SRCDIR)/doc/*.pdf) TUTFILES = $(wildcard $(SRCDIR)/tutorial/*.html) TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.jpg) TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.gif) TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.png) TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.php3) TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.php) TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.ns) TUTFILES += $(wildcard $(SRCDIR)/tutorial/*.txt) TUTFILES += $(SRCDIR)/tutorial/tb_compat.tcl BUIFILES = $(wildcard $(SRCDIR)/buildui/*.html) BUIFILES += $(wildcard $(SRCDIR)/buildui/*.jpg) BUIFILES += $(wildcard $(SRCDIR)/buildui/*.gif) BUIFILES += $(wildcard $(SRCDIR)/buildui/*.php3) BUIFILES += $(wildcard $(SRCDIR)/buildui/*.php) BUIFILES += $(wildcard $(SRCDIR)/buildui/*.class) NLFILES = $(wildcard $(SRCDIR)/netlab/*.html) NLFILES += $(wildcard $(SRCDIR)/netlab/*.php3) NLFILES += $(wildcard $(SRCDIR)/netlab/*.png) NLFILES += $(wildcard $(SRCDIR)/netlab/*.gif) NLFILES += $(wildcard $(SRCDIR)/netlab/*.txt) WEBDBFILES = $(wildcard $(SRCDIR)/webdb/*.php3) WEBDBFILES += $(wildcard $(SRCDIR)/webdb/*.php) HYFILES = $(wildcard $(SRCDIR)/hyperviewer/*.php3) HYFILES += $(wildcard $(SRCDIR)/hyperviewer/*.html) HYFILES += $(wildcard $(SRCDIR)/hyperviewer/*.jpg) HYFILES += $(wildcard $(SRCDIR)/hyperviewer/*.gif) USRPFILES = $(wildcard $(SRCDIR)/usrp/*.php) USRPFILES += $(wildcard $(SRCDIR)/usrp/*.html) # need to make it *.gz; with simply "*", # we end up sucking over "CVS" DOWNLOADFILES = $(wildcard $(SRCDIR)/downloads/*.gz) DOWNLOADFILES += $(wildcard $(SRCDIR)/downloads/*.zip) DOWNLOADFILES += $(wildcard $(SRCDIR)/downloads/*.exe) # # This stuff only gets installed on the main site # ifeq ($(OURDOMAIN),$(MAINSITE)) CVSWEBFILES = $(wildcard $(SRCDIR)/cvsweb/*.php3) CVSWEBFILES += $(wildcard $(SRCDIR)/cvsweb/*.php) CVSWEBFILES += $(wildcard $(SRCDIR)/cvsweb/*.conf) CVSWEBFILES += $(wildcard $(SRCDIR)/cvsweb/*.gif) CVSWEBCGI = $(wildcard $(SRCDIR)/cvsweb/*.cgi) INSTALL_CVSWEBCGI = $(INSTALL_PROGRAM) $(CVSWEBCGI) $(INSTALL_WWWDIR)/cvsweb endif # # Kill the directory part of the names. The vpath rule will do the rest. # ALLFILES = $(notdir $(FILES)) ALLFLOORMAPS = $(notdir $(FLOORMAPFILES)) ALLPIXES = $(notdir $(PIXFILES)) ALLDOCS = $(notdir $(DOCFILES)) ALLTUTS = $(notdir $(TUTFILES)) ALLICONS = $(notdir $(AUTOICONS)) ALLWEBDB = $(notdir $(WEBDBFILES)) ALLDOWNLOADS = $(notdir $(DOWNLOADFILES)) ALLCVSWEB = $(notdir $(CVSWEBFILES)) ALLBUI = $(notdir $(BUIFILES)) ALLNL = $(notdir $(NLFILES)) ALLHY = $(notdir $(HYFILES)) ALLUSRP = $(notdir $(USRPFILES)) install: $(addprefix $(INSTALL_WWWDIR)/, $(ALLFILES)) \ $(addprefix $(INSTALL_WWWDIR)/floormap/, $(ALLFLOORMAPS)) \ $(addprefix $(INSTALL_WWWDIR)/pix/, $(ALLPIXES)) \ $(addprefix $(INSTALL_WWWDIR)/tutorial/, $(ALLTUTS)) \ $(addprefix $(INSTALL_WWWDIR)/doc/, $(ALLDOCS)) \ $(addprefix $(INSTALL_WWWDIR)/webdb/, $(ALLWEBDB)) \ $(addprefix $(INSTALL_WWWDIR)/downloads/, $(ALLDOWNLOADS)) \ $(addprefix $(INSTALL_WWWDIR)/buildui/, $(ALLBUI)) \ $(addprefix $(INSTALL_WWWDIR)/netlab/, $(ALLNL)) \ $(addprefix $(INSTALL_WWWDIR)/hyperviewer/, $(ALLHY)) \ $(addprefix $(INSTALL_WWWDIR)/usrp/, $(ALLUSRP)) \ $(addprefix $(INSTALL_WWWDIR)/autostatus-icons/, $(ALLICONS)) \ $(addprefix $(INSTALL_LIBEXECDIR)/, websearch) \ $(addprefix $(INSTALL_WWWDIR)/cvsweb/, $(ALLCVSWEB)) \ $(addprefix $(INSTALL_ETCDIR)/, swish.conf) (swish-e -c ./swish.conf) cd $(INSTALL_WWWDIR) && \ rm -f tbdb.html; \ ln -s index.html tbdb.html; \ rm -f icons; \ ln -s /usr/local/www/icons icons; $(INSTALL_CVSWEBCGI) post-install: $(INSTALL_WWWDIR)/%: % @echo "Installing $<" -mkdir -p $(patsubst %/,%,$(dir $@)) $(INSTALL_DATA) $(subst $$,\$$,$<) $(subst $$,\$$,$@) # How to recursively descend into subdirectories to make general # targets such as `all'. %.MAKE: @$(MAKE) -C $(dir $@) $(basename $(notdir $@)) %-subdirs: $(addsuffix /%.MAKE,$(SUBDIRS)) ; .PHONY: $(SUBDIRS)