www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/17/16:31:11

From: Johan Karlsson <k AT sm DOT luth DOT se>
Newsgroups: comp.os.msdos.djgpp
Subject: Makefile problems
Date: Thu, 17 Jul 1997 10:54:46 +0200
Organization: Luleå University of Technology
Lines: 83
Message-ID: <33CDDDD6.41C67EA6@sm.luth.se>
NNTP-Posting-Host: my21.sm.luth.se
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi 
I have some prblems with my makefiles when using djgpp make.
When I use them in UNIX they work fine.

First some system info:
I'm using a PC 486 with msdos 6.2, qemm's dpmi-host
and dgjpp 2.0

Relevant environment settings  (path stripped)
------------
COMSPEC=C:\DOS\COMMAND.COM
PATH=C:\GNU\DJGPP\BIN
DJGPP=c:/gnu/djgpp/djgpp.env
------------


I have here a stripped version of my makefiles just to show what the
problem is.

makefile
------------
SRC = /usr/POLDE/src
PWD = $(subst \,/,$(subst C:,,$(shell cd)))
CC = gcc
CFLAGS += -Wall -O2 -idirafter $(SRC)
LFLAGS +=
LIB +=
MODULE = main

#MAKE fix
MAKE1 = $(subst /,\,$(MAKE)) 
#MAKE1 = $(MAKE) 

# rules
all: print

print:
	$(MAKE1) -f print.mk $(MFLAGS) SRCDIR=$(PWD) MODULE=$(MODULE) CC=$(CC)
LFLAGS="$(LFLAGS)" CFLAGS="$(CFLAGS)" SRC=$(SRC)
-------------

print.mk
-------------
Xprint: 
	echo "SRCDIR: $(SRCDIR)"
	echo "SRC: $(SRC)"
	echo "MODULE: $(MODULE)"
	echo "LFLAGS: $(LFLAGS)"
	echo "CFLAGS: $(CFLAGS)"
	echo "CC: $(CC)"
	echo "MFLAGS: $(MFLAGS)"
-------------

Problem one:
The FAQ at http://www.delorie.com/djgpp/v2faq/faq121.html
say that djgpp programs will send the arguments using !proxy method to
avoid problems with the 126-char limit in DOS.
But when I run make, it will only get half of the CFLAGS and none of SRC
in print.mk
So I still have the problem with 126-char limit

Problem two:
In the makefile I have two different version of the MAKE1 variables.
If I don't use the used one, make will fail to do the recursive call.
Whitout complaining, but print.mk will not be called.
ie. I can't just use $(MAKE) for the recursive call

Problem three:
When make should return from print.mk, it can't find the calling program
ie "Batch file missing" is printed
and a fault message
"make.exe: *** [print] Error 1"
is printed from make.


I hope someone can help me to solve these problems.


MVH
Johan Karlsson
mailto:k AT sm DOT luth DOT se
Department of Computer Science and Electrical Engineering
Luleå University of Technology, SWEDEN

- Raw text -


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