summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2008-02-16 15:00:07 -0600
committerVictor Lowther <victor.lowther@gmail.com>2008-02-16 15:00:07 -0600
commita6eeb8096864bee88efe09f6cbb3d9ee3b24cdbd (patch)
tree8d5ef1178af8a05eaa33620172c51ee09033c7e2 /src
parent4d455cec32aefbd9bbc89587fb5676e280e76914 (diff)
parent28f4915e717fbc31b5410f77bf7882928def0545 (diff)
Merge branch 'master' into vlowther-move-pm-main
Diffstat (limited to 'src')
-rw-r--r--src/.gitignore1
-rw-r--r--src/Makefile.am46
-rw-r--r--src/pm-action.in3
-rw-r--r--src/pm-is-supported.in3
-rw-r--r--src/pm-powersave.in8
5 files changed, 25 insertions, 36 deletions
diff --git a/src/.gitignore b/src/.gitignore
index 208cd72..3418ee9 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -2,6 +2,7 @@
.libs
*.o
pm-action
+pm-is-supported
pm-pmu
pm-powersave
pm-reset-swap
diff --git a/src/Makefile.am b/src/Makefile.am
index 0497c86..1d7dd52 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,38 +1,30 @@
-pm_utils_libdir = $(libdir)/pm-utils
-pm_utils_bindir = $(pm_utils_libdir)/bin
+pm_libdir = $(libdir)/pm-utils
+pm_bindir = $(pm_libdir)/bin
pm_sysconfdir = $(sysconfdir)/pm
-pm_utils_bin_PROGRAMS = \
+pm_bin_PROGRAMS = \
pm-pmu \
pm-reset-swap
-pm_utils_bin_SCRIPTS = \
- pm-action
+pm_pmu_SOURCES = pm-pmu.c
-pm_utils_usr_bindir = $(bindir)
+pm_reset_swap_SOURCES = pm-reset-swap.c
-pm_utils_usr_bin_SCRIPTS = \
- pm-is-supported
+pm_bin_SCRIPTS = pm-action
-pm_pmu_SOURCES = \
- pm-pmu.c
+bin_SCRIPTS = pm-is-supported
-pm_reset_swap_SOURCES = \
- pm-reset-swap.c
+dist_bin_SCRIPTS = on_ac_power
-extradir = $(sbindir)
+sbin_SCRIPTS = pm-powersave
-extra_SCRIPTS = \
- pm-powersave
+script_in_files = pm-action.in pm-is-supported.in pm-powersave.in
-acpowerdir = $(bindir)
+CLEANFILES = $(script_in_files:.in=)
-acpower_SCRIPTS = \
- on_ac_power
+EXTRA_DIST = $(script_in_files)
-CLEANFILES = $(pm_utils_bin_SCRIPTS) $(extra_SCRIPTS)
-
-do_subst = sed -e 's,[@]PM-UTILS-LIBDIR[@],$(pm_utils_libdir),g' \
+do_subst = sed -e 's,[@]PM-UTILS-LIBDIR[@],$(pm_libdir),g' \
-e 's,[@]PM-UTILS-SYSCONFDIR[@],$(pm_sysconfdir),g'
SUFFIXES = .in
@@ -43,15 +35,9 @@ SUFFIXES = .in
install-data-hook:
-mkdir -p $(DESTDIR)$(sbindir)
- -ln -s $(pm_utils_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-suspend
- -ln -s $(pm_utils_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-hibernate
- -ln -s $(pm_utils_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-suspend-hybrid
-
-EXTRA_DIST = \
- $(extra_SCRIPTS) \
- $(acpower_SCRIPTS) \
- $(pm_utils_bin_SCRIPTS) \
- $(pm_utils_usr_bin_SCRIPTS)
+ -ln -s $(pm_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-suspend
+ -ln -s $(pm_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-hibernate
+ -ln -s $(pm_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-suspend-hybrid
clean-local :
rm -f *~
diff --git a/src/pm-action.in b/src/pm-action.in
index 894b50b..d9085d7 100644
--- a/src/pm-action.in
+++ b/src/pm-action.in
@@ -26,7 +26,8 @@
# The rule here? Simplicity.
-help_options() {
+help_options()
+{
echo "${0##*/} [options]"
echo
echo "Options can change how the supend or hibernate is done."
diff --git a/src/pm-is-supported.in b/src/pm-is-supported.in
index 62947f7..9e72f9f 100644
--- a/src/pm-is-supported.in
+++ b/src/pm-is-supported.in
@@ -18,7 +18,8 @@
. "@PM-UTILS-LIBDIR@/functions"
-help_options() {
+help_options()
+{
echo "pm-is-supported [--suspend | --hibernate | --suspend-hybrid ]"
echo
}
diff --git a/src/pm-powersave.in b/src/pm-powersave.in
index 5098cf8..a1cdb4a 100644
--- a/src/pm-powersave.in
+++ b/src/pm-powersave.in
@@ -29,9 +29,9 @@ export PM_FUNCTIONS="@PM-UTILS-LIBDIR@/functions"
. "${PM_FUNCTIONS}"
if [ "$1" = "true" -o "$1" = "false" ] ; then
- init_logfile "${POWERSAVE_LOGFILE}"
- run_hooks power "$1"
+ init_logfile "${POWERSAVE_LOGFILE}"
+ run_hooks power "$1"
else
- echo "Argument needs to be true or false" >&2
- exit 1
+ echo "Argument needs to be true or false" >&2
+ exit 1
fi