[Top][All Lists]

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

convert a pattern rule to a suffix rule

From: YuGiOhJCJ Mailing-List
Subject: convert a pattern rule to a suffix rule
Date: Wed, 25 Aug 2010 11:14:15 +0200


I know that pattern rules are not portable. When we use one pattern rule, then 
we call autoreconf, we can see this warning :
man/ `%'-style pattern rules are a GNU make extension
So if we want a protable project, we should not use them in a file.

But we can use a old fashioned suffix rule which is portable. The problem is 
when the prerequisites arn't in the same directory than the target and when the 
prerequisites have no suffix.

In this (see below)
-the target is in the . directory
-the prerequisites are in the ../src/ directory
-the prerequisites have no suffix
dist_man_MANS = t4e.1

HELP2MAN = help2man -h "-h" -v "-v" -N
RM = rm -rfv

all-local: $(dist_man_MANS)

%.1: ../src/%
        $(HELP2MAN) $< -o $@

        $(RM) *.1

I use a pattern rule which is not portable because I don't know how to convert 
it in a suffix rule.

How to convert this pattern rule in a suffix rule?

Thank you.

YuGiOhJCJ Mailing-List <address@hidden>

reply via email to

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