Skip to content

Commit

Permalink
build: Add test to check for nmake consistency
Browse files Browse the repository at this point in the history
Change-Id: I1180ba749d54e7ef433b01b33450e52ac5dbb2bb
Signed-off-by: Greg Tucker <[email protected]>
  • Loading branch information
gbtucker committed Aug 26, 2020
1 parent 24623b8 commit 794b8b6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tools/gen_nmake.mk
Original file line number Diff line number Diff line change
@@ -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) >> $@; )
Expand Down
5 changes: 5 additions & 0 deletions tools/test_extended.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 794b8b6

Please sign in to comment.