~xnox/upstart/read-vs-sigchild

« back to all changes in this revision

Viewing changes to util/Makefile.am

  • Committer: Scott James Remnant
  • Date: 2009-07-08 14:42:15 UTC
  • Revision ID: scott@netsplit.com-20090708144215-efmyqayjqi7v6x6k
* util/utmp.c: Set of functions for dealing with utmp and wtmp
(utmp_read_runlevel): Read the current runlevel from the file
(utmp_get_runlevel): Obtain the current runlevel from the
environment, or the file if not set
(utmp_write_runlevel): Write a runlevel change record, and also
deal with the reboot record if the utmp or wtmp files don't quite
match.
(utmp_write_shutdown): Write a shutdown time record
(utmp_entry, utmp_write, wtmp_write): utility functions for creating
and writing utmp and wtmp records.
* util/utmp.h: Prototypes for new functions.
* util/tests/test_utmp.c: Test cases.
* util/Makefile.am (test_utmp_SOURCES, test_utmp_LDFLAGS)
(test_utmp_LDADD): Details for utmp test cases
(tests): Move to the bottom of the file and make PHONY

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
 
177
177
 
178
178
TESTS = \
179
 
        test_initctl
 
179
        test_initctl \
 
180
        test_utmp
180
181
 
181
182
check_PROGRAMS = $(TESTS)
182
183
 
183
 
tests: $(BUILT_SOURCES) $(check_PROGRAMS)
184
 
 
185
184
test_initctl_SOURCES = tests/test_initctl.c initctl.c
186
185
test_initctl_CFLAGS = $(AM_CFLAGS) -DTEST
187
186
test_initctl_LDFLAGS = -static
192
191
        ../nih-dbus/libnih-dbus.la \
193
192
        $(DBUS_LIBS)
194
193
 
 
194
test_utmp_SOURCES = tests/test_utmp.c
 
195
test_utmp_LDFLAGS = -static
 
196
test_utmp_LDADD = \
 
197
        utmp.o \
 
198
        ../nih/libnih.la
 
199
 
 
200
 
 
201
.PHONY: tests
 
202
tests: $(BUILT_SOURCES) $(check_PROGRAMS)
195
203
 
196
204
clean-local:
197
205
        rm -f *.gcno *.gcda