xparq / NMAKE-Jumpstart

Single-file MSVC/NMAKE "jumpstart" Makefile for building source trees without fuss or extra tooling
0 stars 0 forks source link

Legacy/pending notes to digest... #1

Open xparq opened 1 year ago

xparq commented 1 year ago
#!!Would fail with fatal error U1037 dunno how to make *.ixx, if they don't happen to exist!
#!!objs:: $(src_dir)/$(units_pattern).ixx
#!! @$(MAKE) -nologo RECURSED_FOR_COMPILING=1 DIR=$(DIR) $(patsubst $(src_dir)/%,$(obj_dir)/%,$(**:.ixx=.ifc))

To avoid the issue when a given source type -- used as a wildcard dependency -- doesn't exist in the given source dir, this hackey won't work, because they will catch all the existing cases, too:

$(src_dir)/$(units_pattern).cpp:
#!! Well, no `%|eF` either: it "requires a dependent"! ;)
    @echo Bu! Silencing the "Dunno how to make *.cpp" error, when no such file exists.
$(src_dir)/$(units_pattern).cxx:
    @echo Bu! Silencing the "Dunno how to make *.cxx" error, when no such file exists.
$(src_dir)/$(units_pattern).c:
    @echo Bu! Silencing the "Dunno how to make *.c" error, when no no such file exists.
$(src_dir)/$(units_pattern).ixx:
    @echo Bu! Silencing the "Dunno how to make *.ixx" error, when no no such file exists.

To mitigate the stupid "can't build unmatched wildcard" error, the combined objs: c* rule can (coincidentally...) cover in one rule the cases, where at least some .c* source exists in the given dir...