--- a/trunk/wharfie/wharfie.py +++ b/trunk/wharfie/wharfie.py @@ -111,7 +111,7 @@ if g_depend != '': dep.append(g_depend); - if cmd[0] not in ('FROM', 'TO', 'ENV'): + if cmd[0] not in ('FROM', 'ENV'): g_allDepends += str(cmd); if g_allDepends != '': bld = format(0xFFFFFFFF & binascii.crc32(g_allDepends), '02X') + ".piling.tar"; @@ -148,7 +148,10 @@ # TO elif cmd[0] == 'TO': - make.archiveName = cmd[1].lstrip(); + makeTarget=actions.to(bld, dep, cmd) + bld = makeTarget["name"] + make.makeTargets.append(makeTarget); + g_depend = ''; # SOURCE elif cmd[0] == 'SOURCE': @@ -184,6 +187,7 @@ parser = argparse.ArgumentParser() parser.add_argument('--clean', action='store_true', help="Clear intermediate files" ) parser.add_argument('--info', action='store_true', help="Print info about already generated image" ) + parser.add_argument('--incremental', action='store_true', help="An experimental feature, which uses incremental backup mechanisms of tar." ) parser.add_argument('--gen-only', action='store_true', help="Generate makefile only, but don't build it" ) parser.add_argument('--dry-run', action='store_true', help="Generate makefile with disabled run actions and don't build it" ) parser.add_argument('--verbose', action='store_true', help="Print verbose make output" ) @@ -198,9 +202,9 @@ exit(1) if os.path.isfile(os.path.abspath(os.path.dirname(sys.argv[0])) + "/wharfie.mk"): - make.write_makefile('Makefile', args.dry_run, os.path.dirname(sys.argv[0])); + make.write_makefile('Makefile', args.dry_run, os.path.dirname(sys.argv[0]), args.incremental); else: - make.write_makefile('Makefile', args.dry_run, os.path.abspath(os.path.dirname(sys.argv[0])) + "/../share/wharfie"); + make.write_makefile('Makefile', args.dry_run, os.path.abspath(os.path.dirname(sys.argv[0])) + "/../share/wharfie", args.incremental); # call make flags=""