public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: Makefile that runs w.o. changes on Cygwin & Linux: how to do "rm  -f $(TARGET)"?
@ 2001-09-06 13:42 Peter Buckley
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Buckley @ 2001-09-06 13:42 UTC (permalink / raw)
  To: 'Karr, David', 'cygwin@cygwin.com'

We use ifdefs- messy but effective. 
They get put in a low level include
file, so they work for the multiple 
makefiles that reference target.

ifdef $(CYGWIN)
TARGET = thing.exe
else
TARGET = thing
endif

HTH,
Peter

-----Original Message-----
From: Karr, David [ mailto:david.karr@cacheflow.com ]
Sent: Thursday, September 06, 2001 4:38 PM
To: 'cygwin@cygwin.com'
Subject: Makefile that runs w.o. changes on Cygwin & Linux: how to do
"rm -f $(TARGET)"?


I have a little test application that I want to build and run without change
on Cygwin and Linux.  It almost works perfectly, except for the "clean"
target.  Is there any way to reference "thing" and have it mean "thing" on
Linux, but "thing.exe" on Cygwin?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Makefile that runs w.o. changes on Cygwin & Linux: how to do "rm  -f $(TARGET)"?
@ 2001-09-06 14:43 Robinow, David
  0 siblings, 0 replies; 3+ messages in thread
From: Robinow, David @ 2001-09-06 14:43 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'

MACH=`uname -s`
case "${MACH}" in
 CYGWIN*)
    EXE=".exe"
    ;;
 *)
    EXE=""
    ;;
esac

rm -f thing${EXE}

> -----Original Message-----
> From: Karr, David [ mailto:david.karr@cacheflow.com ]
> Sent: Thursday, September 06, 2001 4:38 PM
> To: 'cygwin@cygwin.com'
> Subject: Makefile that runs w.o. changes on Cygwin & Linux: how to do
> "rm -f $(TARGET)"?
> 
> 
> I have a little test application that I want to build and run 
> without change
> on Cygwin and Linux.  It almost works perfectly, except for 
> the "clean"
> target.  Is there any way to reference "thing" and have it 
> mean "thing" on
> Linux, but "thing.exe" on Cygwin?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Makefile that runs w.o. changes on Cygwin & Linux: how to do "rm -f $(TARGET)"?
@ 2001-09-06 13:36 Karr, David
  0 siblings, 0 replies; 3+ messages in thread
From: Karr, David @ 2001-09-06 13:36 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'

I have a little test application that I want to build and run without change
on Cygwin and Linux.  It almost works perfectly, except for the "clean"
target.  Is there any way to reference "thing" and have it mean "thing" on
Linux, but "thing.exe" on Cygwin?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-09-06 14:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-06 13:42 Makefile that runs w.o. changes on Cygwin & Linux: how to do "rm -f $(TARGET)"? Peter Buckley
  -- strict thread matches above, loose matches on Subject: below --
2001-09-06 14:43 Robinow, David
2001-09-06 13:36 Karr, David

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).