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:
Ozan Çağlayan
2010-07-04 09:00:25 +00:00
parent 8883c1a12f
commit 0dc9a7e2c2
+25 -31
View File
@@ -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,13 +89,12 @@ 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 = ''):
'''make source with given parameters = "all" || "doc" etc.''' '''make source with given parameters = "all" || "doc" etc.'''
if system('make %s %s' % (get.makeJOBS(), parameters)): if system('make %s %s' % (get.makeJOBS(), parameters)):
raise MakeError(_('Make failed.')) raise MakeError(_('Make failed.'))
def fixInfoDir(): def fixInfoDir():
infoDir = '%s/usr/share/info/dir' % get.installDIR() infoDir = '%s/usr/share/info/dir' % get.installDIR()
@@ -105,41 +103,37 @@ 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 \ localstatedir=%(prefix)s/%(localstate)s \
localstatedir=%(prefix)s/%(localstate)s \ 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' % {
%(argument)s' % {'prefix': get.installDIR(), 'prefix': get.installDIR(),
'defaultprefix': get.defaultprefixDIR(), 'defaultprefix': get.defaultprefixDIR(),
'man': get.manDIR(), 'man': get.manDIR(),
'info': get.infoDIR(), 'info': get.infoDIR(),
'localstate': get.localstateDIR(), 'localstate': get.localstateDIR(),
'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:
fixInfoDir()
else: else:
raise InstallError(_('No Makefile found.')) fixInfoDir()
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:
fixInfoDir()
else: else:
raise InstallError(_('No Makefile found.')) fixInfoDir()
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.'''