pisi/actionsapi: No need to check the existence of Makefile*
install() and rawInstall() should not check the existence of a Makefile. This check prevents passing -C to those installation wrappers.
This commit is contained in:
@@ -26,7 +26,6 @@ from pisi.actionsapi.shelltools import system
|
|||||||
from pisi.actionsapi.shelltools import can_access_file
|
from pisi.actionsapi.shelltools import can_access_file
|
||||||
from pisi.actionsapi.shelltools import unlink
|
from pisi.actionsapi.shelltools import unlink
|
||||||
from pisi.actionsapi.libtools import gnuconfig_update
|
from pisi.actionsapi.libtools import gnuconfig_update
|
||||||
from pisi.actionsapi.libtools import libtoolize
|
|
||||||
|
|
||||||
class ConfigureError(pisi.actionsapi.Error):
|
class ConfigureError(pisi.actionsapi.Error):
|
||||||
def __init__(self, value=''):
|
def __init__(self, value=''):
|
||||||
@@ -90,7 +89,6 @@ def rawConfigure(parameters = ''):
|
|||||||
raise ConfigureError(_('No configure script found.'))
|
raise ConfigureError(_('No configure script found.'))
|
||||||
|
|
||||||
def compile(parameters = ''):
|
def compile(parameters = ''):
|
||||||
#FIXME: Only one package uses this until now, hmmm
|
|
||||||
system('%s %s %s' % (get.CC(), get.CFLAGS(), parameters))
|
system('%s %s %s' % (get.CC(), get.CFLAGS(), parameters))
|
||||||
|
|
||||||
def make(parameters = ''):
|
def make(parameters = ''):
|
||||||
@@ -105,7 +103,6 @@ def fixInfoDir():
|
|||||||
|
|
||||||
def install(parameters = '', argument = 'install'):
|
def install(parameters = '', argument = 'install'):
|
||||||
'''install source into install directory with given parameters'''
|
'''install source into install directory with given parameters'''
|
||||||
if can_access_file('makefile') or can_access_file('Makefile') or can_access_file('GNUmakefile'):
|
|
||||||
args = 'make prefix=%(prefix)s/%(defaultprefix)s \
|
args = 'make prefix=%(prefix)s/%(defaultprefix)s \
|
||||||
datadir=%(prefix)s/%(data)s \
|
datadir=%(prefix)s/%(data)s \
|
||||||
infodir=%(prefix)s/%(info)s \
|
infodir=%(prefix)s/%(info)s \
|
||||||
@@ -113,7 +110,8 @@ def install(parameters = '', argument = 'install'):
|
|||||||
mandir=%(prefix)s/%(man)s \
|
mandir=%(prefix)s/%(man)s \
|
||||||
sysconfdir=%(prefix)s/%(conf)s \
|
sysconfdir=%(prefix)s/%(conf)s \
|
||||||
%(parameters)s \
|
%(parameters)s \
|
||||||
%(argument)s' % {'prefix': get.installDIR(),
|
%(argument)s' % {
|
||||||
|
'prefix': get.installDIR(),
|
||||||
'defaultprefix': get.defaultprefixDIR(),
|
'defaultprefix': get.defaultprefixDIR(),
|
||||||
'man': get.manDIR(),
|
'man': get.manDIR(),
|
||||||
'info': get.infoDIR(),
|
'info': get.infoDIR(),
|
||||||
@@ -121,25 +119,21 @@ def install(parameters = '', argument = 'install'):
|
|||||||
'conf': get.confDIR(),
|
'conf': get.confDIR(),
|
||||||
'data': get.dataDIR(),
|
'data': get.dataDIR(),
|
||||||
'parameters': parameters,
|
'parameters': parameters,
|
||||||
'argument':argument}
|
'argument':argument,
|
||||||
|
}
|
||||||
|
|
||||||
if system(args):
|
if system(args):
|
||||||
raise InstallError(_('Install failed.'))
|
raise InstallError(_('Install failed.'))
|
||||||
else:
|
else:
|
||||||
fixInfoDir()
|
fixInfoDir()
|
||||||
else:
|
|
||||||
raise InstallError(_('No Makefile found.'))
|
|
||||||
|
|
||||||
|
|
||||||
def rawInstall(parameters = '', argument = 'install'):
|
def rawInstall(parameters = '', argument = 'install'):
|
||||||
'''install source into install directory with given parameters = PREFIX=%s % get.installDIR()'''
|
'''install source into install directory with given parameters = PREFIX=%s % get.installDIR()'''
|
||||||
if can_access_file('makefile') or can_access_file('Makefile') or can_access_file('GNUmakefile'):
|
|
||||||
if system('make %s %s' % (parameters, argument)):
|
if system('make %s %s' % (parameters, argument)):
|
||||||
raise InstallError(_('Install failed.'))
|
raise InstallError(_('Install failed.'))
|
||||||
else:
|
else:
|
||||||
fixInfoDir()
|
fixInfoDir()
|
||||||
else:
|
|
||||||
raise InstallError(_('No Makefile found.'))
|
|
||||||
|
|
||||||
def aclocal(parameters = ''):
|
def aclocal(parameters = ''):
|
||||||
'''generates an aclocal.m4 based on the contents of configure.in.'''
|
'''generates an aclocal.m4 based on the contents of configure.in.'''
|
||||||
|
|||||||
Reference in New Issue
Block a user