delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/04/07:33:33

Message-Id: <200007041133.GAA04523@darwin.sfbr.org>
From: Jeff T Williams <jeffw AT darwin DOT sfbr DOT org>
To: djgpp AT delorie DOT com
Subject: Using $(HOME) in makefile
Date: Tue, 4 Jul 2000 06:37:55 -0600
X-Mailer: EPOC32 Email Version 1.50
Reply-To: djgpp AT delorie DOT com

My C development trees are rooted differently on my Unix box at work and my 
DJGPP box at home, so I wanted to use $(HOME) in makefiles to facilitate 
portability, e.g.,

INCLUDE += -I$(HOME)/c/nrjtw/include

where HOME is set in my autoexec.bat: set HOME=c:\

This usage generates numerous warnings on my DJGPP box but not on my Unix box. 
 You can see below the reason:  on the DJGPP box (DOS 5.0, bash 2.03, make 
3.79, gcc 2.7.2.1) the INCLUDE variable expands as

	-Ic:\/c/nrjtw/include

which somebody (gcc?) doesn't like.  I suspect gcc, because the line `ls 
$HOME/c/nrjtw/include' works as desired at the bash command line. The 
weirdness is that gcc thinks the standard headers are now in the above INCLUDE 
directory, which they certainly are not.

For the time being I have the makefile check COMSPEC and define HOME 
accordingly.  But is there a better way?

TIA---jtw

gcc -O2 -g -W -Wall  -m386 -Ic:\/c/nrjtw/include -Ic:\/c/nr/include -MMD -c 
mantel.c
mantel.c:1: warning: Header file c:\/c/nrjtw/include/stdio.h exists, but is 
not readable
mantel.c:1: warning: Header file c:\/c/nr/include/stdio.h exists, but is not 
readable
In file included from mantel.c:1:
c:/djgpp/include/stdio.h:13: warning: Header file 
c:\/c/nrjtw/include/sys/version.h exists, but is not readable
c:/djgpp/include/stdio.h:13: warning: Header file 
c:\/c/nr/include/sys/version.h exists, but is not readable
In file included from mantel.c:1:
c:/djgpp/include/stdio.h:14: warning: Header file 
c:\/c/nrjtw/include/sys/djtypes.h exists, but is not readable
c:/djgpp/include/stdio.h:14: warning: Header file 
c:\/c/nr/include/sys/djtypes.h exists, but is not readable
mantel.c:2: warning: Header file c:\/c/nrjtw/include/string.h exists, but is 
not readable
mantel.c:2: warning: Header file c:\/c/nr/include/string.h exists, but is not 
readable
In file included from mantel.c:2:
c:/djgpp/include/string.h:12: warning: Header file 
c:\/c/nrjtw/include/sys/djtypes.h exists, but is not readable
c:/djgpp/include/string.h:12: warning: Header file 
c:\/c/nr/include/sys/djtypes.h exists, but is not readable
c:/djgpp/include/string.h:49: warning: Header file 
c:\/c/nrjtw/include/sys/movedata.h exists, but is not readable
c:/djgpp/include/string.h:49: warning: Header file 
c:\/c/nr/include/sys/movedata.h exists, but is not readable
In file included from c:/djgpp/include/string.h:49,
                 from mantel.c:2:
c:/djgpp/include/sys/movedata.h:16: warning: Header file 
c:\/c/nrjtw/include/sys/djtypes.h exists, but is not readable
c:/djgpp/include/sys/movedata.h:16: warning: Header file 
c:\/c/nr/include/sys/djtypes.h exists, but is not readable
mantel.c:3: warning: Header file c:\/c/nrjtw/include/stdlib.h exists, but is 
not readable
mantel.c:3: warning: Header file c:\/c/nr/include/stdlib.h exists, but is not 
readable
In file included from mantel.c:3:
c:/djgpp/include/stdlib.h:13: warning: Header file 
c:\/c/nrjtw/include/sys/djtypes.h exists, but is not readable
c:/djgpp/include/stdlib.h:13: warning: Header file 
c:\/c/nr/include/sys/djtypes.h exists, but is not readable
mantel.c:4: warning: Header file c:\/c/nrjtw/include/unistd.h exists, but is 
not readable
mantel.c:4: warning: Header file c:\/c/nr/include/unistd.h exists, but is not 
readable
In file included from mantel.c:4:
c:/djgpp/include/unistd.h:15: warning: Header file 
c:\/c/nrjtw/include/sys/types.h exists, but is not readable
c:/djgpp/include/unistd.h:15: warning: Header file 
c:\/c/nr/include/sys/types.h exists, but is not readable
In file included from c:/djgpp/include/unistd.h:15,
                 from mantel.c:4:
c:/djgpp/include/sys/types.h:15: warning: Header file 
c:\/c/nrjtw/include/sys/djtypes.h exists, but is not readable
c:/djgpp/include/sys/types.h:15: warning: Header file 
c:\/c/nr/include/sys/djtypes.h exists, but is not readable
In file included from mantel.c:4:
c:/djgpp/include/unistd.h:16: warning: Header file 
c:\/c/nrjtw/include/sys/djtypes.h exists, but is not readable
c:/djgpp/include/unistd.h:16: warning: Header file 
c:\/c/nr/include/sys/djtypes.h exists, but is not readable
mantel.c:5: warning: Header file c:\/c/nrjtw/include/math.h exists, but is not 
readable
mantel.c:5: warning: Header file c:\/c/nr/include/math.h exists, but is not 
readable
mantel.c:6: warning: Header file c:\/c/nrjtw/include/nrutil.h exists, but is 
not readable
mantel.c:6: warning: Header file c:\/c/nr/include/nrutil.h exists, but is not 
readable
mantel.c:6: nrutil.h: No such file or directory (ENOENT)
mantel.c:7: warning: Header file c:\/c/nrjtw/include/nr.h exists, but is not 
readable
mantel.c:7: warning: Header file c:\/c/nr/include/nr.h exists, but is not 
readable
mantel.c:7: nr.h: No such file or directory (ENOENT)
make.exe: *** [mantel.o] Error 1


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019