help-make
[Top][All Lists]
Advanced

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

Ignored implicit rule


From: Michael Harris
Subject: Ignored implicit rule
Date: Mon, 06 Jan 2003 11:58:28 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Hello

I inherited a Solaris Makefile and am converting it to run on Linux gmake. I have a Makefile that includes the rule:
%.o : %.pl
        $(CP) $< $*.o
        @echo
(I changed it from a suffix to an implicit rule)

This rule simply renames a perl script.  When I type make -r I get:
#--------------------------------------------------
# Building nvo_extract_flux
#--------------------------------------------------
# makeall = announce   nvo_extract_flux
# SCRIPTS = nvo_extract_flux.pl
# script_exec = nvo_extract_flux
make: *** No rule to make target `.o', needed by `nvo_extract_flux'.  Stop.

This is actually a complex program with large dir tree so there are some includes that cause some of the output above. The point is that my implicit rule is being ignored. Does my rule not say "take all .pl files and create a .o file for eacho one?

When I type make I get:
#--------------------------------------------------
# Building nvo_extract_flux
#--------------------------------------------------
# makeall = announce   nvo_extract_flux
# SCRIPTS = nvo_extract_flux.pl
# script_exec = nvo_extract_flux
cc      -o .o
cc: no input files
make: *** [.o] Error 1

I believe make cant find a rule to apply to .pl, so it is just trying a default cc command.

Any advice?

Thanx in advance.




--
Michael Harris
High Energy Astrophysics Division
Smithsonian Astrophysical Observatory
Cambridge, Massachusetts





reply via email to

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