PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/src/pdsh/Makefile.am

https://code.google.com/
Makefile | 86 lines | 68 code | 13 blank | 5 comment | 2 complexity | 77904bc280cc3b53ca5f7cab7eac44e9 MD5 | raw file
 1##*****************************************************************************
 2## $Id$
 3##*****************************************************************************
 4## Process this file with automake to produce Makefile.in.
 5##*****************************************************************************
 6
 7include $(top_srcdir)/config/Make-inc.mk
 8
 9INCLUDES =                 -I$(top_srcdir)
10noinst_PROGRAMS =          pdsh
11bin_PROGRAMS =             pdsh.inst
12
13if WITH_STATIC_MODULES
14MODULE_LIBS =              $(top_builddir)/src/modules/libmods.la 
15else
16MODULE_FLAGS =             -export-dynamic $(AIX_PDSH_LDFLAGS)
17LTDL_FILES =               ltdl.h ltdl.c
18LTDL_LDADD =               $(LIBADD_DL)
19endif
20
21pdsh_LDADD =               $(READLINE_LIBS) $(LTDL_LDADD)
22pdsh_LDFLAGS =             $(MODULE_LIBS) $(MODULE_FLAGS) \
23                           $(top_builddir)/src/common/libcommon.la
24
25pdsh_inst_LDADD =          $(pdsh_LDADD)
26pdsh_inst_LDFLAGS =        $(pdsh_LDFLAGS)
27
28pdsh_SOURCES =             $(PDSH_SOURCES) $(LTDL_FILES)
29pdsh_inst_SOURCES =        $(pdsh_SOURCES)
30nodist_pdsh_SOURCES =      testconfig.c
31nodist_pdsh_inst_SOURCES = config.c
32
33
34PDSH_SOURCES = \
35    main.c \
36    dsh.c \
37    dsh.h \
38    mod.c \
39    mod.h \
40    rcmd.c \
41    rcmd.h \
42    opt.c \
43    opt.h \
44    privsep.c \
45    privsep.h \
46    pcp_server.c \
47    pcp_server.h \
48    pcp_client.c \
49    pcp_client.h \
50    testcase.c \
51    wcoll.c \
52    wcoll.h \
53    cbuf.c \
54    cbuf.h \
55    xpopen.c \
56    xpopen.h
57
58config.c: $(top_srcdir)/META $(top_builddir)/config.h
59	@(echo "char *pdsh_version = \"$(PDSH_VERSION_FULL)\";";\
60          echo "char *pdsh_module_dir = \"$(pkglibdir)\";"\
61         )> config.c
62
63testconfig.c: $(top_srcdir)/META $(top_builddir)/config.h
64	@(echo "char *pdsh_version = \"$(PDSH_VERSION_FULL)\";";\
65          moddir=`cd $(top_builddir)/src/modules && pwd`; \
66          echo "char *pdsh_module_dir = \"$$moddir\";"\
67         )> testconfig.c
68
69install-exec-hook:
70	-mv $(DESTDIR)$(bindir)/pdsh.inst $(DESTDIR)$(bindir)/pdsh
71	@echo "chown root $(DESTDIR)$(bindir)/pdsh"
72	@chown root $(DESTDIR)$(bindir)/pdsh ||\
73         echo "Unable to chown pdsh to root"
74	@cp -p $(DESTDIR)$(bindir)/pdsh $(DESTDIR)$(bindir)/pdcp ||\
75         echo "Unable to copy pdsh to pdcp"
76	@cp -p $(DESTDIR)$(bindir)/pdsh $(DESTDIR)$(bindir)/rpdcp ||\
77         echo "Unable to copy pdsh to rpdcp"
78
79uninstall-local:
80	$(RM) $(DESTDIR)$(bindir)/pdcp
81	$(RM) $(DESTDIR)$(bindir)/rpdcp
82	$(RM) $(DESTDIR)$(bindir)/pdsh
83
84MOSTLYCLEANFILES = \
85    config.c \
86    testconfig.c