help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gmake: How to delete Pref3$1.class


From: Alexander Farber
Subject: Re: gmake: How to delete Pref3$1.class
Date: Sun, 22 Feb 2004 18:47:39 +0000
User-agent: Mutt/1.5.5.1i

I'd like to have Pref3$1.class as a target, but also 
as a prerequisite (and thus pass it to a shell command)

For example here the "rm -f" doesn't work, because shell
(the "rm -f") will expand Pref3$1.class to Pref3.class:

        INNER   = Pref3$$1.class
        CLASSES = $(SOURCES:%.java=%.class) $(INNER)

        $(INNER): Pref3.class

        %.class: %.java
                javac -deprecation -J-Dfile.encoding=KOI8_R $<

        clean:
                rm -f $(CLASSES) tags Pref3.cab Pref3.zip Pref3.jar

And here "rm -f" works, but I couldn't say: gmake 'Pref3$1.class'" 
in shell because the target's name is actually "Pref3\$1.class":

        INNER   = Pref3\$$1.class
        CLASSES = $(SOURCES:%.java=%.class) $(INNER)

        $(INNER): Pref3.class

        %.class: %.java
                javac -deprecation -J-Dfile.encoding=KOI8_R $<

        clean:
                rm -f $(CLASSES) tags Pref3.cab Pref3.zip Pref3.jar




reply via email to

[Prev in Thread] Current Thread [Next in Thread]