1# Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. 2# 3# Redistribution and use in source and binary forms, with or without 4# modification, are permitted provided that the following conditions 5# are met: 6# 7# Redistribution of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer. 9# 10# Redistribution in binary form must reproduce the above copyright 11# notice, this list of conditions and the following disclaimer in the 12# documentation and/or other materials provided with the distribution. 13# 14# Neither the name of Sun Microsystems, Inc. or the names of 15# contributors may be used to endorse or promote products derived 16# from this software without specific prior written permission. 17# 18# This software is provided "AS IS," without a warranty of any kind. 19# ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, 20# INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A 21# PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. 22# SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE 23# FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING 24# OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL 25# SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, 26# OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR 27# PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF 28# LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, 29# EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 30 31DOCDIR = $(datadir)/doc/$(PACKAGE) 32DOCLIST = $(top_srcdir)/README $(top_srcdir)/COPYING $(top_srcdir)/AUTHORS $(top_srcdir)/ChangeLog 33 34EXTRA_DIST = $(DOCLIST) 35 36AUTOMAKE_OPTIONS = dist-bzip2 37 38MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure configure-stamp \ 39 config.guess config.sub depcomp install-sh ltmain.sh missing \ 40 mkinstalldirs config.h.in stamp-h.in \ 41 $(distdir).tar.gz $(distdir).tar.bz2 42 43SUBDIRS = lib src include doc contrib control 44 45dist-hook: 46 cp control/ipmitool.spec $(distdir) 47 48install-data-local: 49 mkdir -p $(DESTDIR)$(DOCDIR) 50 $(INSTALL_DATA) $(DOCLIST) $(DESTDIR)$(DOCDIR) 51 52uninstall-local: 53 -rm -rf $(DESTDIR)$(DOCDIR) 54 55.PHONY: pkg 56pkg: PKG := ipmitool-@VERSION@-@OS@-@ARCH@ 57pkg: control/pkginfo 58 $(STRIP) src/ipmitool 59 $(STRIP) src/ipmitool 60 (cd control ; pkgmk -o -d /tmp) 61 pkgtrans -s /tmp $(PKG) ipmitool 62 gzip -c /tmp/$(PKG) > $(PKG).gz 63 -rm -rf /tmp/ipmitool /tmp/$(PKG) 64 65BUILDDIR = ${shell cd $(top_builddir) ; pwd | sed -e 's,^[^:\\/]:[\\/],/,'} 66SRCDIR = ${shell cd $(top_srcdir) ; pwd | sed -e 's,^[^:\\/]:[\\/],/,'} 67RPMDIR = $(BUILDDIR)/rpmbuild 68 69.PHONY: rpm 70rpm: control/ipmitool.spec dist 71 mkdir -p $(RPMDIR)/{BUILD,RPMS,SRPMS,SOURCES,SPECS,tmp} 72 cp control/ipmitool.spec $(RPMDIR)/SPECS 73 BUILDDIR=$(RPMDIR) CONFIGDIR=$(BUILDDIR)/control \ 74 @RPMBUILD@ -ba --rcfile $(SRCDIR)/control/rpmrc \ 75 $(RPMDIR)/SPECS/ipmitool.spec 76 77.PHONY: clean-rpm 78clean-rpm: 79 -rm -rf $(RPMDIR) 80