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 debian/changelog debian/control debian/copyright \ 36 debian/dirs debian/docs debian/rules 37 38AUTOMAKE_OPTIONS = dist-bzip2 39 40MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure configure-stamp \ 41 config.guess config.sub depcomp install-sh ltmain.sh missing \ 42 mkinstalldirs config.h.in stamp-h.in \ 43 $(distdir).tar.gz $(distdir).tar.bz2 44 45SUBDIRS = lib src include doc contrib control 46 47dist-hook: 48 cp control/ipmitool.spec $(distdir) 49 50install-data-local: 51 mkdir -p $(DESTDIR)$(DOCDIR) 52 $(INSTALL_DATA) $(DOCLIST) $(DESTDIR)$(DOCDIR) 53 54uninstall-local: 55 -rm -rf $(DESTDIR)$(DOCDIR) 56 57.PHONY: pkg 58pkg: PKG := ipmitool-@VERSION@-@OS@-@ARCH@ 59pkg: control/pkginfo 60 $(STRIP) src/ipmitool 61 $(STRIP) src/ipmitool 62 (cd control ; pkgmk -o -d /tmp) 63 pkgtrans -s /tmp $(PKG) ipmitool 64 gzip -c /tmp/$(PKG) > $(PKG).gz 65 -rm -rf /tmp/ipmitool /tmp/$(PKG) 66 67BUILDDIR = ${shell cd $(top_builddir) ; pwd | sed -e 's,^[^:\\/]:[\\/],/,'} 68SRCDIR = ${shell cd $(top_srcdir) ; pwd | sed -e 's,^[^:\\/]:[\\/],/,'} 69RPMDIR = $(BUILDDIR)/rpmbuild 70 71.PHONY: rpm 72rpm: control/ipmitool.spec dist 73 mkdir -p $(RPMDIR)/{BUILD,RPMS,SRPMS,SOURCES,SPECS,tmp} 74 cp control/ipmitool.spec $(RPMDIR)/SPECS 75 BUILDDIR=$(RPMDIR) CONFIGDIR=$(BUILDDIR)/control \ 76 @RPMBUILD@ -ba --rcfile $(SRCDIR)/control/rpmrc \ 77 $(RPMDIR)/SPECS/ipmitool.spec 78 79.PHONY: clean-rpm 80clean-rpm: 81 -rm -rf $(RPMDIR) 82