Hi,
I'm working on a Makefile that will update pseudo-code target files that
end with the suffix "apx" from the source code files that end with the
suffix "app". Because the "apx" files are interpreted, the driver modules
don't need to be updated if the modules they call are older. Below is the
Makefile that I have so far:
#############################################################
#
# Set up Source and Target Paths
#
SRCDIR = \src\dklodge
LIBDIR = \usr\local\lib\dklodge
#
#
#############################################################
#
# The Compiler/Interpreter and it's flags
#
CMPLR = codelock
CFLAGS = $*.exc
#
#
#############################################################
#
# Estabilish Dependency Rules
#
.SUFFIXES : .apx .app
.app.apx:
$(CMPLR) $(CFLAGS)
#
#
#############################################################
#
# List of Binary Files
#
OBJECTS = delmcomt.apx delmem.apx editmem.apx edmcom.apx mbrcomit.apx \
menu.apx notice.apx vmem.apx
#
#
#############################################################
#
# (THE DEFAULT) Make lodge.apx and it's objects
#
lodge.apx: $(OBJECTS)
#
#
#############################################################
#
# Remove unwanted BAK and CKP files
# and ignore the non-zero error code
# caused by nonexistant BAK and CKP files.
#
clean:
-rm $(SRCDIR)\*.BAK
-rm $(SRCDIR)\*.CKP
#
#
#############################################################
The problem here is that in all cases lodge.apx is always updated. How can
I get around this? If I was dealing with a compiled language then all would
be well.
I also want to be able to issue the command-line
make install
and have Make copy all files ending in "apx" that are older than files of the
same name in a target directory. Can Make compare file modification dates
of file /src/foo.apx and /target/foo.apx ?
Thanks,
Ed Stuart