Browse Source

build and diff fixes

pull/80/head
curt mayer 6 years ago
parent
commit
c30c5a6437
  1. 16
      Tools/Makefile.inc
  2. 8
      Tools/unix/casefn.sh

16
Tools/Makefile.inc

@ -128,13 +128,21 @@ clobber:: clean
( echo "clobbering in `pwd`/$$dir" ; cd "$$dir" ; make clobber ) ; \
done
#
# this is used to verify that the unix and windows tool chains are generating
# the same objects
#
diff::
@for dir in $(SUBDIRS) ; do \
( echo "diffing in `pwd`/$$dir" ; cd "$$dir" ; make diff ) ; \
( echo "diff in $(HERE)/$$dir" ; cd "$$dir" ; make diff ) ; \
done
@for i in $(OBJECTS) ; do \
sf=$$($(CASEFN) $$i) ; df=$$($(CASEFN) $(DIFFPATH)/$$i) ; \
echo diffing $$sf and $$df ; \
diff $$sf $$df ; \
sf=$$($(CASEFN) $$i) ; \
df=$$($(CASEFN) $(DIFFPATH)/$$i) ; \
if [ -f $$df -a -f $$sf ] ; then \
if ! cmp -s $$sf $$df ; then \
echo $$sf and $$df differ ; \
fi \
fi \
done

8
Tools/unix/casefn.sh

@ -2,6 +2,7 @@
# given a filename on the command line, echo the form of the file that
# actually can be opened. this needs to do filesystem case shenanigans
#
n=0
for infn in $* ; do
dir=$(dirname $infn)
lowname=$(basename $infn | tr '[A-Z]' '[a-z]')
@ -10,7 +11,12 @@ for infn in $* ; do
cand=$(basename ./"$i" | tr '[A-Z]' '[a-z]')
if [ ./"$cand" = ./$lowname ] ; then
echo -n "$dir/$i "
((n++))
fi
done
done
echo
if [ $n == 0 ] ; then
echo "nofile"
else
echo
fi

Loading…
Cancel
Save