Changeset 3527


Ignore:
Timestamp:
Dec 19, 2021, 5:32:15 PM (3 years ago)
Author:
bird
Message:

Generate exec wrappers for using the kBuild util programs by the unixy names on windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/misc/Makefile.kmk

    r3208 r3527  
    3333kmk_time_SOURCES.win = ../lib/quote_argv.c
    3434
     35
     36#
     37# Wrapper stubs for using the kBuild binaries as standard unixy ones on windows.
     38#
     39TEMPLATE_EXECWRAPPER = Windows exec wrapper
     40TEMPLATE_EXECWRAPPER_EXTENDS    = BIN
     41TEMPLATE_EXECWRAPPER_INST       = $(TEMPLATE_BIN_INST)wrappers/
     42TEMPLATE_EXECWRAPPER_CFLAGS     = $(TEMPLATE_BIN_CFLAGS) -GS-
     43TEMPLATE_EXECWRAPPER_LDFLAGS    = $(TEMPLATE_BIN_LDFLAGS) /Entry:BareBoneStart
     44TEMPLATE_EXECWRAPPER_LIBS       = $(NO_SUCH_VARIABLE)
     45TEMPLATE_EXECWRAPPER_LIBS.x86   = $(NO_SUCH_VARIABLE)
     46TEMPLATE_EXECWRAPPER_LIBS.amd64 = $(NO_SUCH_VARIABLE)
     47TEMPLATE_EXECWRAPPER_SOURCES    = win_exec_wrapper.c
     48
     49define def_WindowsWrapper
     50PROGRAMS.win += $1
     51$1_TEMPLATE   = EXECWRAPPER
     52$1_DEFS       = TARGET_EXE_NAME=\"$2.exe\"
     53endef
     54
     55$(evalcall2 def_WindowsWrapper,cat,kmk_cat)
     56$(evalcall2 def_WindowsWrapper,cp,kmk_cp)
     57$(evalcall2 def_WindowsWrapper,echo,kmk_echo)
     58$(evalcall2 def_WindowsWrapper,expr,kmk_expr)
     59$(evalcall2 def_WindowsWrapper,ln,kmk_ln)
     60$(evalcall2 def_WindowsWrapper,mkdir,kmk_mkdir)
     61$(evalcall2 def_WindowsWrapper,mv,kmk_mv)
     62$(evalcall2 def_WindowsWrapper,kkill,kmk_kill)
     63$(evalcall2 def_WindowsWrapper,killall,kmk_kill)
     64$(evalcall2 def_WindowsWrapper,printf,kmk_printf)
     65$(evalcall2 def_WindowsWrapper,rm,kmk_rm)
     66$(evalcall2 def_WindowsWrapper,rmdir,kmk_rmdir)
     67$(evalcall2 def_WindowsWrapper,sed,kmk_sed)
     68$(evalcall2 def_WindowsWrapper,sleep,kmk_sleep)
     69$(evalcall2 def_WindowsWrapper,touch,kmk_touch)
     70
    3571include $(KBUILD_PATH)/subfooter.kmk
    3672
Note: See TracChangeset for help on using the changeset viewer.