[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 |
Hello,
I know that pattern rules are not portable. When we use one pattern rule, then
we call autoreconf, we can see this warning :
man/Makefile.am:8: `%'-style pattern rules are a GNU make extension
So if we want a protable project, we should not use them in a Makefile.am 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 Makefile.am (see below)
-the target is in the . directory
-the prerequisites are in the ../src/ directory
-the prerequisites have no suffix
Makefile.am
---
dist_man_MANS = t4e.1
HELP2MAN = help2man -h "-h" -v "-v" -N
RM = rm -rfv
all-local: $(dist_man_MANS)
%.1: ../src/%
$(HELP2MAN) $< -o $@
clean-local:
$(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>
- convert a pattern rule to a suffix rule,
YuGiOhJCJ Mailing-List <=