* mingw-w64-make/PKGBUILD:
- prepare: build with batch file build_w32.bat (instead of autotools,
- since autotools approach is not fully supported for Windows builds).
- overwrite default executable name 'gnumake' with 'mingw32-make'.
- cd to src dir of package to apply package patches, since the dir
structure was changed with make version 4.3.
- check: move check section in package to separate function check.
- use overall helper function defining the executable dir.
* mingw-w64-make/make-check-load-feature.mak:
- add CFLAGS the user can pass to the makefile on the command line
- simplify setting of default value of LIBS
* mingw-w64-make/make-4.3_undef-HAVE_STRUCT_DIRENT_D_TYPE.patch:
- add this patch which #undefs HAVE_STRUCT_DIRENT_D_TYPE for any compiler.
NOTE: The guard for MINGW64 does not suffice, it is required for MINGW32, too.
30 lines
943 B
Makefile
30 lines
943 B
Makefile
# Check whether GNU Make's dll load feature
|
|
# - is unlocked and compiled into $(MAKE)
|
|
# - works when using the compiled import library libgnumake-1.dll.a
|
|
|
|
# Check if our make prog is compiled with activated load feature.
|
|
ifeq ($(filter load,$(.FEATURES)),)
|
|
$(error FAILED ...GNU Make feature to load a dll not active in executable '$(MAKE)')
|
|
else
|
|
$(warning PASSED ... GNU Make feature to load a dll active in executable '$(MAKE)'.)
|
|
endif
|
|
|
|
# If loading the dll fails, make will try to build the
|
|
# target 'mk_temp.dll' and restart from scratch again.
|
|
-load mk_temp.dll
|
|
|
|
# Run and check the new make function 'mk-temp'.
|
|
.PHONY: all
|
|
TXT_ERROR = FAILED Temporary file not created
|
|
TXT_PASSED = PASSED Temporary file created.
|
|
all:
|
|
$(if $(mk-temp tmpfile.),$(warning $(TXT_PASSED)),$(error $(TXT_ERROR)))
|
|
|
|
ifeq ($(LIBS),)
|
|
LIBS = -lgnumake-1
|
|
endif
|
|
|
|
%.dll: %.c
|
|
$(warning Compiling $@.)
|
|
gcc -shared -fPIC $(CFLAGS) -o $@ $< $(LIBS)
|