premake/premake-core

Broken Clean action for C# Make projects

Aperta

#149 aperta il 10 lug 2015

 (0 commenti) (0 reazioni) (0 assegnatari)C (651 fork)auto 404
enhancementgmakehelp wanted

Metriche repository

Star
 (3621 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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

Guida contributor