Makefile revision 295749
11556Srgrimes# @(#)Makefile 8.1 (Berkeley) 5/31/93 250471Speter# $FreeBSD: head/bin/dd/Makefile 295749 2016-02-18 08:44:16Z thomas $ 31556Srgrimes 4289487Sngie.include <src.opts.mk> 5289487Sngie 61556SrgrimesPROG= dd 71556SrgrimesSRCS= args.c conv.c conv_tab.c dd.c misc.c position.c 81556Srgrimes 9126666Sphk# 10126666Sphk# Test the character conversion functions. We have to be explicit about 11126666Sphk# which LC_LANG we use because the definition of upper and lower case 12126666Sphk# depends on it. 13128048Snjl# 14128048Snjl 15128048SnjlCLEANFILES= gen 16128048Snjl 17128048Snjltest: ${PROG} gen 18126666Sphk.for conv in ascii ebcdic ibm oldascii oldebcdic oldibm \ 19126667Sphk pareven parnone parodd parset \ 20126666Sphk swab lcase ucase 21128048Snjl @${ECHO} testing conv=${conv} 22128048Snjl @./gen | \ 23128048Snjl LC_ALL=en_US.US-ASCII ./dd conv=${conv} 2>/dev/null | \ 24128048Snjl LC_ALL=en_US.US-ASCII hexdump -C | \ 25128048Snjl diff -I FreeBSD - ${.CURDIR}/ref.${conv} 26126666Sphk.endfor 27295749Sthomas @${ECHO} "testing sparse file (obs zeroes)" 28295749Sthomas @./gen 189284 | ./dd ibs=16 obs=8 conv=sparse of=obs_zeroes 2> /dev/null 29295749Sthomas @hexdump -C obs_zeroes | diff -I FreeBSD - ${.CURDIR}/ref.obs_zeroes 30128048Snjl 31295749Sthomas @${ECHO} "testing spase file (all zeroes)" 32295749Sthomas @./dd if=/dev/zero of=1M_zeroes bs=1048576 count=1 2> /dev/null 33295749Sthomas @./dd if=1M_zeroes of=1M_zeroes.1 bs=1048576 conv=sparse 2> /dev/null 34295749Sthomas @./dd if=1M_zeroes of=1M_zeroes.2 bs=1048576 2> /dev/null 35295749Sthomas @diff 1M_zeroes 1M_zeroes.1 36295749Sthomas @diff 1M_zeroes 1M_zeroes.2 37295749Sthomas 38295749Sthomas @rm -f gen 1M_zeroes* obs_zeroes 39295749Sthomas 40289487Sngie.if ${MK_TESTS} != "no" 41289487SngieSUBDIR+= tests 42289487Sngie.endif 43289487Sngie 44128048Snjl.include <bsd.prog.mk> 45