First commit - second part
Former-commit-id: 202296404e6a70f8ae96db99faffb456104c57e9 Former-commit-id: 118417735d2055683607df9809c9b721cc1b1bab
This commit is contained in:
48
config/targets/package.targ
Normal file
48
config/targets/package.targ
Normal file
@@ -0,0 +1,48 @@
|
||||
#
|
||||
# $Id: package.targ 1825 2013-02-26 09:39:47Z viari $
|
||||
#
|
||||
# package.targ
|
||||
#
|
||||
# default make targets for standard package with configure
|
||||
#
|
||||
# you should define the 'PKG' variable
|
||||
# (and optionaly 'PKGTAR', 'PKGDIR')
|
||||
#
|
||||
|
||||
PKGTAR ?= $(PKG).tgz
|
||||
|
||||
PKGDIR ?= build.$(PORTNAME)
|
||||
|
||||
PRTPATH = $(abspath $(PRTDIR))
|
||||
|
||||
#
|
||||
# Rules
|
||||
#
|
||||
|
||||
.PHONY: all clean test portclean pkg pkg.expand pkg.make pkg.install
|
||||
|
||||
all:: pkg
|
||||
|
||||
pkg.expand::
|
||||
test -d $(PKGDIR) || mkdir $(PKGDIR)
|
||||
test -f $(PKGDIR)/configure || $(TAR) zxf $(PKGTAR) -C $(PKGDIR) --strip-components 1
|
||||
|
||||
pkg.make:: pkg.expand
|
||||
test -f $(PKGDIR)/Makefile || (cd $(PKGDIR) && ./configure --prefix=$(PRTPATH))
|
||||
$(MAKE) -C $(PKGDIR)
|
||||
|
||||
pkg.install:: pkg.make
|
||||
$(MAKE) -C $(PKGDIR) install
|
||||
|
||||
pkg:: pkg.install
|
||||
@echo "+++++++++++ package $(PKG) done"
|
||||
|
||||
test::
|
||||
(! test -d $(PKGDIR)) || $(MAKE) -C $(PKGDIR) test
|
||||
|
||||
clean::
|
||||
(! test -d $(PKGDIR)) || $(MAKE) -C $(PKGDIR) clean
|
||||
|
||||
portclean::
|
||||
(! test -d $(PKGDIR)) || $(MAKE) -C $(PKGDIR) distclean
|
||||
(! test -d $(PKGDIR)) || \rm -r $(PKGDIR)
|
Reference in New Issue
Block a user