From: Johan Karlsson 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 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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