[comp.sys.ibm.pc] TOUCH on IBM-PC?

bo-j@obelix.liu.se (Bo Jansson) (09/15/87)

In the distrubution of nethack there was a makefile for ndmake
enclosed. This makefile tries to execute TOUCH. I don't have
TOUCH on my PC, so I replaced TOUCH FILE with:
TYPE FILE > A.A
COPY A.A FILE
DEL A.A

That would do the job! But however, is TOUCH a famous program to the
IBMPC that everyone have? I don't have it.
-- 
      Bo Jansson,   Linkoping  Sweden
	
UUCP: bo-j@obelix.liu.se, or {mcvax,munnari,uunet}!enea!liuida!obelix!bo-j

tr@wind.bellcore.com (tom reingold) (09/16/87)

In article <1334@obelix.liu.se> bo-j@obelix.liu.se (Bo Jansson) writes:
>In the distrubution of nethack there was a makefile for ndmake
>enclosed. This makefile tries to execute TOUCH. I don't have
>TOUCH on my PC, so I replaced TOUCH FILE with:
>TYPE FILE > A.A
>COPY A.A FILE
>DEL A.A
>
>That would do the job! But however, is TOUCH a famous program to the
>IBMPC that everyone have? I don't have it.
>-- 
>      Bo Jansson,   Linkoping  Sweden
>	
>UUCP: bo-j@obelix.liu.se, or {mcvax,munnari,uunet}!enea!liuida!obelix!bo-j

I don't have a public domain version of either touch or make, buut
there are some good commercial products.  I have not noticed any flaws
in the Make that comes with TurboC.  However, I am not a Make maven so
I would not notice esoteric deficiencies.  Touch comes with TurboC and
with MKS tools.

Here is a Touch.Bat that is more reliable and faster than Bo's.

echo off
copy %1/b,,+ %1 > nul

Name:		Tom Reingold
Disclaimer:	Nothing I say is an opinion.
INTERNET:       tr@bellcore.bellcore.com
UUCP: 		<backbone>!bellcore!tr

sytek@tekgen.UUCP (09/17/87)

The only touch I know of is the one distributed with TurboC.

Mike.

nather@ut-sally.UUCP (Ed Nather) (09/19/87)

/* touch - set file modification time to current time */

#include <stdio.h>

main(argc, argv)
int argc;
char **argv;
{
register int i;

for(i = 1; --argc > 0; i++) {
    if(utime(argv[i], NULL) < 0)
        perror(argv[i]);
    }
}
-- 
Ed Nather
Astronomy Dept, U of Texas @ Austin
{allegra,ihnp4}!{noao,ut-sally}!utastro!nather
nather@astro.AS.UTEXAS.EDU

grimlok@hubcap.UUCP (Mike Percy) (09/19/87)

in article <1755@tekgen.TEK.COM>, sytek@tekgen.TEK.COM (Mike Ewan) says:
> 
> 
> The only touch I know of is the one distributed with TurboC.
> 
> Mike.

And a good one it is too...however for those who don't have TC or any
other touch, there is an easy (easier thanm what I've seen here so far)
to do the same thing from dos simply :

  COPY filename.ext+NUL

This is safe on source files but I wonder about .obj files, but how
often does one touch an .obj file anyway? 

toma@tekgvs.TEK.COM (Tom Almy) (09/21/87)

In article <476@hubcap.UUCP> grimlok@hubcap.UUCP (Mike Percy) writes:

>but how often does one touch an .obj file anyway? 

I touch an obj file if I have cosmetically changed the source file and
don't want to recompile it.

Tom Almy