make

make

Post by Richard E. Stua » Wed, 18 Apr 1990 23:37:32



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

 
 
 

make

Post by Leo de W » Sun, 29 Apr 1990 04:57:46



|
|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.

Make sure the command for lodge.apx is existent; the implicit rule for .app
to .apx won't be used then. So:

lodge.apx: $(OBJECTS)
        :

will do the trick (a tab and a colon).

|
|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 ?

Yes, you can do that using Make, though it isn't very trivial (implicit
rules only work for files in one and the same directory). The following
sample rule will copy *.apx files from directory /src to directory
/target, if they are out of date, by building a dependency rule for
each .apx file and running make on it:

SDIR = /src
TDIR = /target

copy_apx :
        (cd $(SDIR); ls *.apx)|\

        (echo all : $(TDIR)/*.apx; cat)|\
        make -f -

    Leo.

 
 
 

1. Making changes to env variables and making them stick

I am a complete newbie to the Unix environment. We are running Solaris
8. Every time I make a change to the environment variables for a
particular user (notes, sybase, etc. ) the change doesn't stick after
i log off as that particular user. Does anyone have any suggestions on
how to make the changes stick regardless of if and when you log off?

Thanks in advance.

Deepika

2. bsd-like ps command

3. Making a new kernel - CVSuped, not made world yet.

4. X Windows / Netscape

5. Configuring, making & making install. WOEs! :(

6. iMac and Linux printers

7. Making Linux more user friendly

8. ISO CD images for other Linux dists?

9. Linux making inroads on the desktop...

10. What does lock_kernel and unlock_kernel actualy makes ?

11. Making Streamer-Backups

12. Predict drive life by noise it makes?

13. making from src - /usr/src/lib/csu/i386