| 810 | ##} |
| 811 | |
| 812 | def init(manager): |
| 813 | engine = manager.engine() |
| 814 | |
| 815 | engine.register_action("common.MkDir1-quick-fix-for-unix", 'mkdir -p "$(<)"') |
| 816 | engine.register_action("common.MkDir1-quick-fix-for-windows", 'if not exist "$(<)\\" mkdir "$(<)"') |
| 817 | |
| 818 | import b2.tools.make |
| 819 | import b2.build.alias |
| 820 | |
| 821 | global __RM, __CP, __IGNORE, __LN |
| 822 | # ported from trunk@47281 |
| 823 | if os_name() == 'NT': |
| 824 | __RM = 'del /f /q' |
| 825 | __CP = 'copy' |
| 826 | __IGNORE = '2>nul >nul & setlocal' |
| 827 | __LN = __CP |
| 828 | #if not __LN: |
| 829 | # __LN = CP |
| 830 | else: |
| 831 | __RM = 'rm -f' |
| 832 | __CP = 'cp' |
| 833 | __IGNORE = '' |
| 834 | __LN = 'ln' |
| 835 | |
| 836 | engine.register_action("common.Clean", __RM + ' "$(>)"', |
| 837 | flags=['piecemeal', 'together', 'existing']) |
| 838 | engine.register_action("common.copy", __CP + ' "$(>)" "$(<)"') |
| 839 | engine.register_action("common.RmTemps", __RM + ' "$(>)" ' + __IGNORE, |
| 840 | flags=['quietly', 'updated', 'piecemeal', 'together']) |
| 841 | |
| 842 | engine.register_action("common.hard-link", |
| 843 | __RM + ' "$(<)" 2$(NULL_OUT) $(NULL_OUT)' + os.linesep + |
| 844 | __LN + ' "$(>)" "$(<)" $(NULL_OUT)') |