Open tommitytom opened 1 year ago
Could you also upload the makefile that was generated?
Sure!
Makefile
# Alternative GNU Make workspace makefile autogenerated by Premake
ifndef config
config=debug
endif
ifndef verbose
SILENT = @
endif
ifeq ($(config),debug)
Bar_config = debug
else
$(error "invalid configuration $(config)")
endif
PROJECTS := Bar
.PHONY: all clean help $(PROJECTS)
all: $(PROJECTS)
Bar:
ifneq (,$(Bar_config))
@echo "==== Building Bar ($(Bar_config)) ===="
@${MAKE} --no-print-directory -C . -f Bar.make config=$(Bar_config)
endif
clean:
@${MAKE} --no-print-directory -C . -f Bar.make clean
help:
@echo "Usage: make [config=name] [target]"
@echo ""
@echo "CONFIGURATIONS:"
@echo " debug"
@echo ""
@echo "TARGETS:"
@echo " all (default)"
@echo " clean"
@echo " Bar"
@echo ""
@echo "For more information, see https://github.com/premake/premake-core/wiki"
Bar.make
# Alternative GNU Make project makefile autogenerated by Premake
ifndef config
config=debug
endif
ifndef verbose
SILENT = @
endif
.PHONY: clean prebuild
SHELLTYPE := posix
ifeq (.exe,$(findstring .exe,$(ComSpec)))
SHELLTYPE := msdos
endif
# Configurations
# #############################################
define PREBUILDCMDS
endef
define PRELINKCMDS
endef
define POSTBUILDCMDS
@echo Running postbuild commands
echo Hello
endef
# File sets
# #############################################
# Rules
# #############################################
all: $(TARGETDIR) $(TARGET)
@:
$(TARGET):
$(PREBUILDCMDS)
$(PRELINKCMDS)
$(POSTBUILDCMDS)
$(TARGETDIR):
@echo Creating $(TARGETDIR)
ifeq (posix,$(SHELLTYPE))
$(SILENT) mkdir -p $(TARGETDIR)
else
$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
endif
clean:
@echo Cleaning Bar
# File Rules
# #############################################
I was having the same issue on windows. Running mingw32-make clean
then mingw32-make
again solved the issue.
Before:
PS E:\Dev\IDJ\pinguim> mingw32-make
"==== Building engine (debug) ===="
"==== Building penguim (debug) ===="
Clean projects:
PS E:\Dev\IDJ\pinguim> mingw32-make clean
Cleaning engine
Cleaning penguim
After:
PS E:\Dev\IDJ\pinguim> mingw32-make
"==== Building engine (debug) ===="
Creating ../obj/debug-windows-x86/engine
"main.cpp"
"myclass.cpp"
Linking engine
"==== Building penguim (debug) ===="
Creating ../obj/debug-windows-x86/penguim
"main.cpp"
"myclass.cpp"
Linking penguim
Running postbuild commands
copy /B /Y C:\SDL32\bin\*.dll ..\build\debug-windows-x86\penguim
C:\SDL32\bin\SDL2.dll
C:\SDL32\bin\SDL2_image.dll
C:\SDL32\bin\SDL2_mixer.dll
C:\SDL32\bin\SDL2_ttf.dll
4 arquivo(s) copiado(s).
copy /B /Y ..\build\debug-windows-x86\engine\*.dll ..\build\debug-windows-x86\penguim
..\build\debug-windows-x86\engine\engine_debug.dll
1 arquivo(s) copiado(s).
Makes me curious if this is a problem with make caching the "build" and thinking that it's already been executed.
What seems to be the problem?
What did you expect to happen? I expected "Hello" to be printed to the console
What have you tried so far?
Seems to also be an issue with prebuildcommands too. Works as expected with
vs2022
.How can we reproduce this? See above.
What version of Premake are you using? Note that although this says I am using a
-dev
version, I grabbed it directly from premake-5.0.0-beta2-linux.tar.gzAnything else we should know?