summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Biebl <mbiebl@gmail.com>2008-02-14 16:52:28 +0100
committerVictor Lowther <victor.lowther@gmail.com>2008-02-16 10:23:08 -0600
commit7f51729e23cfb0906ddd37d4bb24b8d26653d06e (patch)
tree46bc866d63b611879f8bec984a11f407b56fb9f8 /src
parent1a9e28fa4a4d2cb1e1be016ac50188b3de871da9 (diff)
Clean up generated files and put *.in files in the tarball.
Make sure to clean up all generated files on "make clean". Don't distribute generated files in the dist tarball, only the *.in files. Add generated files to .gitignore. Use consistend naming for the install dirs. Install defaults file as data file. Keep EXTRA_DIST and CLEANFILES in sync.
Diffstat (limited to 'src')
-rw-r--r--src/.gitignore1
-rw-r--r--src/Makefile.am46
2 files changed, 17 insertions, 30 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 *~