GNUmakefile.in 2.8 KB
Newer Older
1
#
2
# Copyright (c) 2008-2012 University of Utah and the Flux Group.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
# 
# {{{GENIPUBLIC-LICENSE
# 
# GENI Public License
# 
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Work, and to permit persons to whom the Work
# is furnished to do so, subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Work.
# 
# THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS
# IN THE WORK.
# 
# }}}
28 29 30 31 32 33 34 35 36
#

SRCDIR		= @srcdir@
TESTBED_SRCDIR	= @top_srcdir@
OBJDIR		= ../..
SUBDIR		= protogeni/lib

include $(OBJDIR)/Makeconf

Leigh Stoller's avatar
Leigh Stoller committed
37
LIB_SCRIPTS     = GeniDB.pm GeniUser.pm  \
38
		  GeniSlice.pm GeniSA.pm GeniCM.pm GeniCMV2.pm \
39
		  GeniTicket.pm GeniSliver.pm GeniCredential.pm \
40
		  GeniComponent.pm GeniCH.pm GeniEmulabUtil.pm \
Leigh Stoller's avatar
Leigh Stoller committed
41
		  GeniAuthority.pm GeniCertificate.pm GeniAggregate.pm \
42
		  GeniUtil.pm GeniRegistry.pm GeniUsage.pm GeniHRN.pm \
43
		  GeniSES.pm GeniResource.pm GeniXML.pm GeniAM.pm \
44
		  GeniEmulab.pm GeniFoam.pm GeniStitch.pm \
45
		  GeniStd.pm GeniMA.pm GeniStdSA.pm GeniSR.pm
Leigh Stoller's avatar
Leigh Stoller committed
46
SBIN_SCRIPTS	= plabnodewrapper plabslicewrapper
47

Leigh Stoller's avatar
Leigh Stoller committed
48
SCRIPTS		= genischemacheck.pl
49

Leigh Stoller's avatar
Leigh Stoller committed
50 51 52
# These scripts installed setuid, with sudo. 
SETUID_SBIN_SCRIPTS  = plabnodewrapper plabslicewrapper

53 54 55 56
#
# Force dependencies on the scripts so that they will be rerun through
# configure if the .in file is changed.
# 
Leigh Stoller's avatar
Leigh Stoller committed
57
all:	$(LIB_SCRIPTS) $(SBIN_SCRIPTS) $(SCRIPTS)
58 59 60

include $(TESTBED_SRCDIR)/GNUmakerules

61
install: $(addprefix $(INSTALL_LIBDIR)/, $(LIB_SCRIPTS)) \
Leigh Stoller's avatar
Leigh Stoller committed
62
	 $(addprefix $(INSTALL_SBINDIR)/, $(SBIN_SCRIPTS)) \
63
	 $(addprefix $(INSTALL_DIR)/opsdir/lib/, $(OPS_LIBS))
64

65 66 67 68 69 70 71 72 73
#
# A check to see if this is a 'real' install. Kinda hacky, but as far as I can
# tell, you can't put ifeq()'s inside of targets
#
ifeq ($(TBROOT),/usr/testbed)
SCHEMACHECK= cd $(OBJDIR)/protogeni/lib && perl genischemacheck.pl
else
SCHEMACHECK= @echo "Skipping schema check, since prefix isn't /usr/testbed"
endif
74
install-genischemacheck: genischemacheck.pl
75 76 77
	@echo "Checking DB schema..."
	$(SCHEMACHECK)

78 79 80 81 82
control-install:

clean:
	rm -f *.o core $(LIB_SCRIPTS)

83 84 85 86
$(INSTALL_DIR)/opsdir/lib/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_DIR)/opsdir/lib
	$(INSTALL) $< $@
87