Thumbnail file hits. Based on a patch from D Bera
[beagle.git] / tools / Makefile.am
blobf873a655b293f0df993d626856f95f461c4e2dab
2 CSC = mcs -debug
4 applicationsdir = $(datadir)/applications
5 applications_DATA = beagle-settings.desktop
7 LOCAL_ASSEMBLIES =                      \
8         ../Util/Util.dll                \
9         ../BeagleClient/Beagle.dll
11 ASSEMBLIES =                            \
12         $(EVO_SHARP_LIBS)               \
13         $(BEAGLE_UI_LIBS)               \
14         -r:Mono.Posix                   \
15         $(LOCAL_ASSEMBLIES:%=-r:%)
17 WRAPPER_IN = wrapper.in
18 WRAPPER_SED = sed                                       \
19         -e "s|\@prefix\@|$(prefix)|g"                   \
20         -e "s|\@pkglibdir\@|$(pkglibdir)|g"             \
21         -e "s|\@libdir\@|$(libdir)|g"                   \
22         -e "s|\@bindir\@|$(bindir)|g"                   \
23         -e "s|\@sbindir\@|$(sbindir)|g"                 \
24         -e "s|\@sysconfdir\@|$(sysconfdir)|g"           \
25         -e "s|\@localstatedir\@|$(localstatedir)|g"     \
26         -e "s|\@gacprefix\@|$(GAC_PREFIX)|g"            \
27         -e "s|\@bash\@|$(BASH)|"
29 CRAWL_WRAPPER = beagle-crawl-system
30 CRAWL_WRAPPER_IN = $(CRAWL_WRAPPER).in
32 $(CRAWL_WRAPPER) : $(CRAWL_WRAPPER_IN)
33         $(WRAPPER_SED) < $(srcdir)/$(CRAWL_WRAPPER_IN) > $@
34         chmod +x $(CRAWL_WRAPPER)
36 CRAWL_RULES = \
37         $(srcdir)/crawl-rules/crawl-windows             \
38         $(srcdir)/crawl-rules/crawl-applications        \
39         $(srcdir)/crawl-rules/crawl-documentation
41 # Install the system crawler into cron.daily and 
42 # set up the crawler configuration files
43 crondir = $(sysconfdir)/cron.daily
44 cron_SCRIPTS = $(CRAWL_WRAPPER)
46 # FIXME: Per-distribution specific crawl rules
47 configdir = $(sysconfdir)/beagle
48 config_DATA = $(CRAWL_RULES)
50 INFO_TARGET  = Info.exe
51 INFO_WRAPPER = beagle-info
52 INFO_CSFILES = $(srcdir)/Info.cs
54 $(INFO_TARGET): $(INFO_CSFILES) $(LOCAL_ASSEMBLIES)
55         $(CSC) -out:$@ $(CSFLAGS) $(INFO_CSFILES) $(ASSEMBLIES)
57 $(INFO_WRAPPER): $(WRAPPER_IN)
58         $(WRAPPER_SED) -e "s|\@target\@|$(INFO_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
59         chmod +x $(INFO_WRAPPER)
61 SHUTDOWN_TARGET  = Shutdown.exe
62 SHUTDOWN_WRAPPER = beagle-shutdown
63 SHUTDOWN_CSFILES = $(srcdir)/Shutdown.cs
65 $(SHUTDOWN_TARGET): $(SHUTDOWN_CSFILES) $(LOCAL_ASSEMBLIES)
66         $(CSC) -out:$@ $(CSFLAGS) $(SHUTDOWN_CSFILES) $(ASSEMBLIES)
68 $(SHUTDOWN_WRAPPER): $(WRAPPER_IN)
69         $(WRAPPER_SED) -e "s|\@target\@|$(SHUTDOWN_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
70         chmod +x $(SHUTDOWN_WRAPPER)
72 QUERY_TARGET  = Query.exe
73 QUERY_WRAPPER = beagle-query
74 QUERY_CSFILES = $(srcdir)/Query.cs
76 $(QUERY_TARGET): $(QUERY_CSFILES) $(LOCAL_ASSEMBLIES)
77         $(CSC) -out:$@ $(CSFLAGS) $(QUERY_CSFILES) $(ASSEMBLIES)
79 $(QUERY_WRAPPER): $(WRAPPER_IN)
80         $(WRAPPER_SED) -e "s|\@target\@|$(QUERY_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
81         chmod +x $(QUERY_WRAPPER)
83 EXERCISE_FILE_SYSTEM_TARGET = ExerciseFileSystem.exe
84 EXERCISE_FILE_SYSTEM_WRAPPER = beagle-exercise-file-system
85 EXERCISE_FILE_SYSTEM_CSFILES = $(srcdir)/ExerciseFileSystem.cs
87 $(EXERCISE_FILE_SYSTEM_TARGET): $(EXERCISE_FILE_SYSTEM_CSFILES) $(LOCAL_ASSEMBLIES)
88         $(CSC) -out:$@ $(CSFLAGS) $(EXERCISE_FILE_SYSTEM_CSFILES) $(ASSEMBLIES)
90 $(EXERCISE_FILE_SYSTEM_WRAPPER): $(WRAPPER_IN)
91         $(WRAPPER_SED) -e "s|\@target\@|$(EXERCISE_FILE_SYSTEM_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
92         chmod +x $(EXERCISE_FILE_SYSTEM_WRAPPER)
94 CONFIG_TARGET = Config.exe
95 CONFIG_WRAPPER = beagle-config
96 CONFIG_CSFILES = $(srcdir)/Config.cs
98 $(CONFIG_TARGET): $(CONFIG_CSFILES) $(LOCAL_ASSEMBLIES)
99         $(CSC) -out:$@ $(CSFLAGS) $(CONFIG_CSFILES) $(ASSEMBLIES)
101 $(CONFIG_WRAPPER): $(WRAPPER_IN)
102         $(WRAPPER_SED) -e "s|\@target\@|$(CONFIG_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
103         chmod +x $(CONFIG_WRAPPER)
105 if ENABLE_WEBSERVICES
106 SETTINGS_CSFLAGS = -define:ENABLE_WEBSERVICES
107 endif
109 SETTINGS_TARGET    = Settings.exe
110 SETTINGS_WRAPPER   = beagle-settings
111 SETTINGS_CSFILES   = $(srcdir)/Settings.cs
112 SETTINGS_RESOURCES = $(srcdir)/settings.glade
113 SETTINGS_RESOURCES_BUILD = $(foreach res,$(SETTINGS_RESOURCES), $(addprefix -resource:,$(srcdir)/$(res)),$(notdir $(res)))
115 $(SETTINGS_TARGET): $(SETTINGS_CSFILES) $(LOCAL_ASSEMBLIES)
116         $(CSC) -out:$@ $(SETTINGS_RESOURCES_BUILD) $(CSFLAGS) $(SETTINGS_CSFLAGS) $(SETTINGS_CSFILES) $(ASSEMBLIES)
118 $(SETTINGS_WRAPPER): $(WRAPPER_IN)
119         $(WRAPPER_SED) -e "s|\@target\@|$(SETTINGS_TARGET)|g" < $(srcdir)/$(WRAPPER_IN) > $@
120         chmod +x $(SETTINGS_WRAPPER)
122 TARGETS =                               \
123         $(INFO_TARGET)                  \
124         $(SHUTDOWN_TARGET)              \
125         $(QUERY_TARGET)                 \
126         $(EXERCISE_FILE_SYSTEM_TARGET)  \
127         $(CONFIG_TARGET)                \
128         $(SETTINGS_TARGET)
130 WRAPPERS =                              \
131         $(INFO_WRAPPER)                 \
132         $(SHUTDOWN_WRAPPER)             \
133         $(QUERY_WRAPPER)                \
134         $(EXERCISE_FILE_SYSTEM_WRAPPER) \
135         $(CONFIG_WRAPPER)               \
136         $(SETTINGS_WRAPPER)             
138 bin_SCRIPTS =                   \
139         $(WRAPPERS)             \
140         beagle-index-info       \
141         beagle-ping             \
142         beagle-status
144 man_MANS =                      \
145         beagle-query.1          \
146         beagle-shutdown.1       \
147         beagle-status.1         \
148         beagle-config.1
150 all: $(TARGETS) $(WRAPPERS)
152 install-data-local: $(TARGETS)
153         $(mkinstalldirs) $(DESTDIR)$(pkglibdir)
154         $(INSTALL_DATA) $(TARGETS) $(DESTDIR)$(pkglibdir)
156 uninstall-local:
157         cd $(DESTDIR)$(pkglibdir) && rm -f $(TARGETS)
159 EXTRA_DIST =                            \
160         $(WRAPPER_IN)                   \
161         $(CRAWL_WRAPPER_IN)             \
162         $(INFO_CSFILES)                 \
163         $(SHUTDOWN_CSFILES)             \
164         $(QUERY_CSFILES)                \
165         $(EXERCISE_FILE_SYSTEM_CSFILES) \
166         $(CONFIG_CSFILES)               \
167         $(SETTINGS_CSFILES)             \
168         $(SETTINGS_RESOURCES)           \
169         $(man_MANS)                     \
170         $(CRAWL_RULES)                  \
171         beagle-index-info               \
172         beagle-ping                     \
173         beagle-status                   \
174         boot.inotify.init               \
175         beagle-settings.desktop
177 CLEANFILES =                            \
178         $(TARGETS)                      \
179         $(TARGETS:%=%.mdb)              \
180         $(WRAPPERS)                     \
181         $(CRAWL_WRAPPER)