Expunge revision histories in files.
[become] / src / Makefile.am
CommitLineData
8ddbfc62 1## Process this file with `automake' to generate `Makefile.in'
2## -*-makefile-*-
3##
af4f4d6a 4## $Id: Makefile.am,v 1.17 2004/04/08 01:36:20 mdw Exp $
8ddbfc62 5##
6## Makefile for `become'
7##
c758e654 8## (c) 1998 EBI
8ddbfc62 9##
10
11##----- Licensing notice ----------------------------------------------------
12##
13## This file is part of `become'
14##
15## `Become' is free software; you can redistribute it and/or modify
16## it under the terms of the GNU General Public License as published by
17## the Free Software Foundation; either version 2 of the License, or
18## (at your option) any later version.
19##
20## `Become' is distributed in the hope that it will be useful,
21## but WITHOUT ANY WARRANTY; without even the implied warranty of
22## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23## GNU General Public License for more details.
24##
25## You should have received a copy of the GNU General Public License
26## along with `become'; if not, write to the Free Software Foundation,
27## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28
8ddbfc62 29##----- General setup things ------------------------------------------------
30
8ddbfc62 31## --- What to make ---
32
f60a3434 33bin_PROGRAMS = become bcquery
e646baee 34noinst_LIBRARIES = libbecome.a
8ddbfc62 35
36##----- Building the main code ----------------------------------------------
37
38## --- The library contains most of the interesting stuff ---
39
e646baee 40libbecome_a_SOURCES = \
8ddbfc62 41 check.c daemon.c \
42 lexer.l parser.y \
f60a3434 43 class.c name.c netg.c rule.c userdb.c ypstuff.c \
8ddbfc62 44 \
45 become.h \
46 check.h daemon.h \
03820e87 47 lexer.h parse.h \
f60a3434 48 class.h name.h netg.h rule.h userdb.h ypstuff.h
8ddbfc62 49
e646baee 50BUILT_SOURCES = \
51 parser.c parser.h lexer.c
52
8ddbfc62 53## --- Yaccing and lexing ---
54
03820e87 55YFLAGS = -d -v
56
03820e87 57dist-hook:
58 for i in $(BUILT_SOURCES); do \
59 [ -r $(distdir)/$$i ] || ln $$i $(distdir)/$$i; \
60 done
8ddbfc62 61
62## --- The main programs ---
63
e646baee 64LDADD = libbecome.a @LEXLIB@
0d036225 65
8ddbfc62 66become_SOURCES = become.c
4710b942 67bcquery_SOURCES = bcquery.c
8ddbfc62 68
e646baee 69become_DEPENDENCIES = libbecome.a
e646baee 70bcquery_DEPENDENCIES = libbecome.a
8ddbfc62 71
5b175cbb 72##----- Become must be setuid root ------------------------------------------
73
03820e87 74install-exec-hook:
bc8fea85 75 become_prog=$(DESTDIR)/${bindir}/`echo become|sed '${transform}'`; \
5b175cbb 76 { chown root $${become_prog} && \
77 chmod 4755 $${become_prog}; } || \
78 { echo ">>>>>"; \
79 echo ">>>>> $${become_prog} must be installed setuid-root"; \
80 echo ">>>>>"; \
81 }
82
8ddbfc62 83##----- Testing -------------------------------------------------------------
84
85## --- The test programs ---
86
8bdddfb7 87TESTS = name-test netg-test userdb-test
8ddbfc62 88
89## --- How to build a test rig ---
90
91SUFFIXES = .tro
92.c.tro:
8bdddfb7 93 $(COMPILE) -DTEST_RIG $< -c -o $@
8ddbfc62 94
95## --- Now build all the test programs ---
96##
97## This is a right pain. However, `automake' provides no way of automating
98## this. (A drop-out to raw perl would be nice, for example.)
99
e646baee 100name-test: name.tro libbecome.a
101 $(LINK) name.tro libbecome.a $(LIBS)
e646baee 102userdb-test: userdb.tro libbecome.a
103 $(LINK) userdb.tro libbecome.a $(LIBS)
e646baee 104netg-test: netg.tro libbecome.a
8bdddfb7 105 $(LINK) netg.tro libbecome.a $(LIBS)
8ddbfc62 106
0d036225 107CLEANFILES = *.tro y.output
108
8ddbfc62 109##----- That's all, folks ---------------------------------------------------