build: Add test to check for nmake consistency

Change-Id: I1180ba749d54e7ef433b01b33450e52ac5dbb2bb
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
This commit is contained in:
Greg Tucker 2020-08-26 11:41:03 -07:00
parent 24623b8b82
commit 794b8b60c1
2 changed files with 14 additions and 2 deletions

View File

@ -1,11 +1,18 @@
# Regenerate nmake file from makefiles or check its consistency
test_nmake_file: tst.nmake
@diff -u Makefile.nmake tst.nmake || (echo Potential nmake consistency issue; $(RM) tst.nmake; false;)
@echo No nmake consistency issues
@$(RM) tst.nmake
FORCE:
Makefile.nmake: FORCE
Makefile.nmake tst.nmake: FORCE
@echo Regenerating $@
@echo '########################################################################' > $@
@cat LICENSE | sed -e 's/^/#/ ' >> $@
@echo '########################################################################' >> $@
@echo '' >> $@
@echo '# This file can be auto-regenerated with $$make -f Makefile.unx $@' >> $@
@echo '# This file can be auto-regenerated with $$make -f Makefile.unx Makefile.nmake' >> $@
@echo '' >> $@
@echo -n 'objs =' >> $@
@$(foreach o, $(subst /,\\,$(objs:.o=.obj)), printf " %s\n\t%s" \\ $(o) >> $@; )

View File

@ -170,6 +170,11 @@ msg+=$'Custom hufftable build: Pass\n'
$MAKE -f Makefile.unx clean
test_start "nmake_file_consistency"
$MAKE -f Makefile.unx test_nmake_file
test_end "nmake_file_consistency" $?
msg+=$'Nmake file consistency: Pass\n'
# noarch build
test_start "noarch_build"
time $MAKE -f Makefile.unx -j $cpus arch=noarch $build_opt