On Jan 31, 2008 8:11 AM, Dan Nicholson <[EMAIL PROTECTED]> wrote:
> Give this a shot:
>
> .SUFFIXES: .in
> .in:
>     $(do_subst) $< > $@
>
> .SUFFIXES are old-style pattern rules. This is what automake uses to
> be portable across make variants when constricting pattern rules for
> .c, .o, etc.

Nice.  Patch attached (applies on the top of the other two patches in
this series).

> --
> Dan
>
diff --git a/pm/sleep.d/Makefile.am b/pm/sleep.d/Makefile.am
index 43f25f0..f8d4933 100644
--- a/pm/sleep.d/Makefile.am
+++ b/pm/sleep.d/Makefile.am
@@ -45,8 +45,10 @@ do_subst = sed -e 's,[EMAIL PROTECTED]@],$(pm_utils_libdir),g'
 # Doing this will ensure that the scripts will function 
 # no matter where they are installed.
 
-$(sleep_SCRIPTS): $(sleep_sources) Makefile
-	$(do_subst) <$(srcdir)/[EMAIL PROTECTED] > $@
+SUFFIXES = .in
+
+.in:
+	$(do_subst) $< > $@
 	chmod +x $@
 
 install-data-hook:
diff --git a/src/Makefile.am b/src/Makefile.am
index bfd1399..4328cf7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -46,8 +46,10 @@ install-data-hook:
 
 do_subst = sed -e 's,[EMAIL PROTECTED]@],$(pm_utils_libdir),g'
 
-pm-action pm-powersave: $(transform_sources) Makefile
-	$(do_subst) < $(srcdir)/[EMAIL PROTECTED] >$@
+SUFFIXES = .in
+
+.in:
+	$(do_subst) $< >$@
 	chmod +x $@
 
 EXTRA_DIST =				\
_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils

Reply via email to