Index: __init__.py =================================================================== --- __init__.py (revision 438744) +++ __init__.py (working copy) @@ -984,12 +984,18 @@ max_children = max_children + max_compile_jobs + # Register list of file handlers, as well as setting our_path to the + # absolute path to unsermake for instances like sudo with --secure-path. + # Assumes that one of the module dirs has the unsermake script. handlers = [] for sourcedir in moduledirs: files = os.listdir(sourcedir) for l in files: if l.endswith('.um'): handlers.append(os.path.join(sourcedir, l)) + if l == 'unsermake': + utilities.our_path = sourcedir + '/' + l + handlers.sort() for file in handlers: Index: amfile.py =================================================================== --- amfile.py (revision 438744) +++ amfile.py (working copy) @@ -888,6 +888,7 @@ output.append('%s = @%s@\n' % (var, var)) output.append("transform = @program_transform_name@\n") output.append("INSTALL = @INSTALL@\n") + output.append("UNSERMAKE = %s\n" % (utilities.our_path)) phonies = [] keys = self.targets.keys() @@ -916,7 +917,7 @@ output.append(".FORWARDS: " + string.join(forwards) + "\n\n") for key in forwards: output.append("%s:\n\t@echo 'WARNING: use unsermake instead of make or use a wrapper script, e.g. makeobj!!!'\n\t%s %s\n\n" % - (key, utilities.our_path, key)) + (key, '$(UNSERMAKE)', key)) output += targets_output