[Pm-utils] [patch review request] Remove hardcoded /usr/lib/pm-utils/functions dependence
victor.lowther at gmail.com
Wed Jan 30 17:59:18 PST 2008
Try 2 -- this time with real automake support.
Sorry for the size of the patch -- lots of file renames, doncha know.
The real changes are in pm/sleep.d/Makefile.am and src/Makefile.am
Also sorry that the changes are fugly -- my small amount of research
did not come up with a way of writing a rule that says "Transform all
these files at once, make!"
The patch should apply cleanly to git head.
On Jan 30, 2008 9:39 AM, Victor Lowther <victor.lowther at gmail.com> wrote:
> On Jan 30, 2008 3:48 AM, Michael Biebl <mbiebl at gmail.com> wrote:
> > 2008/1/30, Victor Lowther <victor.lowther at gmail.com>:
> > > The attached patch removes our depencence on a hardcoded path to
> > > pm/functions. It modifies Makefile.am in the src and pm/sleep.d
> > > directories to have make install rewrite the installed scripts to
> > > source the final installation location of pm/functions, not the
> > > hardcoded path.
> > >
> > > One interesting thing to note is that the scripts are considered data
> > > by the autotools process, so all that install-exec-(local|hook) stuff
> > > has been incorrect for the lifetime of pm-utils so far.
> > >
> > > I would like some review and testing -- it Works For Me, but I am an
> > > autotools n00b and probably missed something.
> > I'd rather not implement it this way (besides that your implementation
> > currently ignores DESTDIR).
> > Usually, such things are done a bit differently, using *.in files that
> > are processed during make time.
> > So you'd have e.g pm/functions.in and in pm/Makefile.am
> > functions: functions.in
> > $(edit) $< >$@
> > edit = sed \
> > -e 's|@PM-UTILS-LIBDIR[@]|$(libdir)/pm-utils|g'
> > CLEANFILES = functions
> > ...
> Thanks for the pointers -- I will investigate using this method to
> make the scripts and hooks location-independent. If you kmnow of a
> package that already does similar hacks, a pointer to it for study
> purposes would be greatly appreciated.
> > Michael
> > --
> > Why is it that all of the instruments seeking intelligent life in the
> > universe are pointed away from Earth?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 35912 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/pm-utils/attachments/20080130/aee7741b/attachment-0001.patch
More information about the Pm-utils