premake/premake-core

Broken Clean action for C# Make projects

開放

#149 建立於 2015年7月10日

 (0 則留言) (0 個反應) (0 位負責人)C (651 個分叉)auto 404
enhancementgmakehelp wanted

倉庫指標

星標
 (3,621 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

The clean action in the C# make backend is not implemented.

Clean:

vagrant@vagrant-ubuntu-trusty-64:/vagrant/CppSharp$ config=release_x64 make -C build/gmake/ clean
make: Entering directory `/vagrant/CppSharp/build/gmake'
make[1]: Nothing to be done for `clean'.
Cleaning Basic.Native
make[1]: Nothing to be done for `clean'.
make[1]: Nothing to be done for `clean'.
make[1]: Nothing to be done for `clean'.
make: Leaving directory `/vagrant/CppSharp/build/gmake'

After clean:

vagrant@vagrant-ubuntu-trusty-64:/vagrant/CppSharp$ ls -lh build/gmake/lib/Release_x64/*.dll
-rwxrwxrwx 1 vagrant vagrant  98K Jul 10 22:12 build/gmake/lib/Release_x64/Basic.CSharp.dll
-rwxrwxrwx 1 vagrant vagrant  16K Jul 10 22:12 build/gmake/lib/Release_x64/Basic.Tests.CSharp.dll

Checking the Premake source in make_csharp.lua reveals why:

    function make.csCleanRules(prj, toolset)
        --[[
        -- porting from 4.x
        _p('clean:')
        _p('\t@echo Cleaning %s', prj.name)
        _p('ifeq (posix,$(SHELLTYPE))')
        _p('\t$(SILENT) rm -f $(TARGETDIR)/%s.* $(COPYFILES)', target.basename)
        _p('\t$(SILENT) rm -rf $(OBJDIR)')
        _p('else')
        _p('\t$(SILENT) if exist $(subst /,\\\\,$(TARGETDIR)/%s) del $(subst /,\\\\,$(TARGETDIR)/%s.*)', target.name, target.basename)
        for target, source in pairs(cfgpairs[anycfg]) do
            _p('\t$(SILENT) if exist $(subst /,\\\\,%s) del $(subst /,\\\\,%s)', target, target)
        end
        for target, source in pairs(copypairs) do
            _p('\t$(SILENT) if exist $(subst /,\\\\,%s) del $(subst /,\\\\,%s)', target, target)
        end
        _p('\t$(SILENT) if exist $(subst /,\\\\,$(OBJDIR)) rmdir /s /q $(subst /,\\\\,$(OBJDIR))')
        _p('endif')
        _p('')
        --]]
    end

貢獻者指南