From: "Andy Woodcock" Newsgroups: comp.os.msdos.djgpp Subject: MAKE operation in old Windows98 environments. Date: Fri, 29 Nov 2002 16:17:55 -0000 Lines: 181 Message-ID: NNTP-Posting-Host: 62.137.44.60 X-Trace: newsg1.svr.pol.co.uk 1038586679 27441 62.137.44.60 (29 Nov 2002 16:17:59 GMT) NNTP-Posting-Date: 29 Nov 2002 16:17:59 GMT X-Complaints-To: abuse AT theplanet DOT net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com When running the MAKE on a very old Windows98 machine it insists on rebuilding every thing from scratch every time. On a project with eighty plus source files this can be quite tedious. I believe the problem has something to do with the build environment (NOTE I have no control over this and must use whatever I am given). I have created a very simple project to demonstrate the problem. When the MAKE is executed in the older Windows98 environment it rebuilds from scratch even when the project is up to date. When the MAKE is executed in a more up to date Windows98 environment it only builds out of date components. Below are logs of runs of the MAKE with the "debug" option in both environments. The older Windows98 machine is installed on a Novell network (version ????) but the test compilation where made on the local C-drive. On the older the machine the log appears to indicate that the MAKE is not even picking up the source and header files (NOTE all file names were lower case). Has anybody out there got any ideas as to how I can achieve correct behaviour of the MAKE in the old environment. Cheers Andy Woodcock ********************************************** ********************************************** **** Old Windows 98 Environment. **** **** VER = Windows 98 [Version 4.10.1998] **** ********************************************** ********************************************** GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. Built for i386-pc-msdosdjgpp Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Report bugs to . Reading makefiles... Updating goal targets.... File `gmtest.exe' does not exist. File `obj/main.o' does not exist. File `src/main.h' does not exist. Must remake target `src/main.h'. Successfully remade target file `src/main.h'. File `src/src_a.h' does not exist. Must remake target `src/src_a.h'. Successfully remade target file `src/src_a.h'. File `src/src_b.h' does not exist. Must remake target `src/src_b.h'. Successfully remade target file `src/src_b.h'. File `src/main.c' does not exist. Must remake target `src/main.c'. Successfully remade target file `src/main.c'. Must remake target `obj/main.o'. gcc -c src/main.c -o obj/main.o -g -I./src Successfully remade target file `obj/main.o'. File `obj/src_a.o' does not exist. File `src/src_a.c' does not exist. Must remake target `src/src_a.c'. Successfully remade target file `src/src_a.c'. Must remake target `obj/src_a.o'. gcc -c src/src_a.c -o obj/src_a.o -g -I./src Successfully remade target file `obj/src_a.o'. File `obj/src_b.o' does not exist. File `src/src_b.c' does not exist. Must remake target `src/src_b.c'. Successfully remade target file `src/src_b.c'. Must remake target `obj/src_b.o'. gcc -c src/src_b.c -o obj/src_b.o -g -I./src Successfully remade target file `obj/src_b.o'. Must remake target `gmtest.exe'. gcc -o gmtest.exe ./obj/main.o ./obj/src_a.o ./obj/src_b.o Successfully remade target file `gmtest.exe'. ********************************************** ********************************************** **** Newer Windows 98 Environment. **** **** VER = Windows 98 [Version 4.10.2222] **** ********************************************** ********************************************** GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. Built for i386-pc-msdosdjgpp Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Report bugs to . Reading makefiles... Updating goal targets.... make.exe: `gmtest.exe' is up to date. # ********************************************** # ********************************************** # **** THE TEST PROJECT MAKE FILE **** # ********************************************** # ********************************************** TARGET = gmtest CC = gcc # ******************************************************************* # * Directory Paths * # ******************************************************************* ROOTDIR = . SRCDIR = $(ROOTDIR)\src HDRDIR = $(ROOTDIR)\src OBJDIR = $(ROOTDIR)\obj SRC = $(subst \,/,$(SRCDIR)) HDR = $(subst \,/,$(HDRDIR)) OJT = $(subst \,/,$(OBJDIR)) CFLAGS = -g -I$(HDR) # ******************************************************************* # * Locations GMAKE will search for Source and Header files. * # ******************************************************************* vpath %.c $(SRC) vpath %.h $(HDR) # ******************************************************************* # * Rules * # ******************************************************************* $(OJT)/%.o: $(SRC)/%.c $(CC) -c $< -o $@ $(CFLAGS) $(SRC)/%.c: ; $(HDR)/%.h: ; %.mak: ; .PRECIOUS: $(SRC)/%.c $(HDR)/%.h %.mak # ******************************************************************* # * Object and Dependencies * # ******************************************************************* OBJECTS = $(OJT)/main.o $(OJT)/src_a.o $(OJT)/src_b.o MAIN_DEP = main.h src_a.h src_b.h SRC_A_DEP = main.h src_a.h SRC_B_DEP = main.h src_b.h # ******************************************************************* # * Build an EXE * # ******************************************************************* $(TARGET).exe : $(OBJECTS) -$(CC) -o $(TARGET).exe $(OBJECTS) # ******************************************************************* # * Source Components * # ******************************************************************* $(OJT)/main.o : $(SRC)/main.c $(addprefix $(HDR)/,$(MAIN_DEP)) $(OJT)/src_a.o : $(SRC)/src_a.c $(addprefix $(HDR)/,$(SRC_A_DEP)) $(OJT)/src_b.o : $(SRC)/src_b.c $(addprefix $(HDR)/,$(SRC_B_DEP)) .PHONEY: clean clean: -del $(TARGET).exe -del $(subst /,\,$(OJT)/*.o) # ********************************************** # ********************************************** # **** END OF TEST PROJECT MAKE FILE **** # ********************************************** # **********************************************