xref: /haiku/src/apps/haikudepot/Jamfile (revision 52f7c9389475e19fc21487b38064b4390eeb6fea)
1SubDir HAIKU_TOP src apps haikudepot ;
2
3# disable -Werror for this directory only
4SubDirC++Flags -Wno-error ;
5
6include [ FDirName $(HAIKU_TOP) src apps haikudepot build jam
7	HdsSchemaGenRules ] ;
8
9UsePrivateHeaders interface kernel net netservices package shared storage ;
10UsePrivateHeaders support locale ;
11
12HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY = $(TARGET_COMMON_DEBUG_LOCATE_TARGET) ;
13
14# During the build process, some sources are generated into directories.  These
15# are the directories.
16
17local dumpExportRepositoryBulkListerTargetDirectory =
18	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
19		dumpexportrepositorybulklistener ] ;
20local dumpExportPkgBulkListenerTargetDirectory =
21	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
22		dumpexportpkgbulklistener ] ;
23local dumpExportReferenceListenerTargetDirectory =
24	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
25		dumpexportreferencelistener ] ;
26
27local dumpExportPkgModelTargetDirectory =
28	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
29		dumpexportpkgmodel ] ;
30local dumpExportRepositoryModelTargetDirectory =
31	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
32		dumpexportrepositorymodel ] ;
33local dumpExportReferenceModelTargetDirectory =
34	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
35		dumpexportreferencemodel ] ;
36
37# During the build process, some sources are generated into a directory.  In
38# order to maintain a timestamp on that generation process, a dummy file is
39# used to signify the target of the generation.  The leafname of this dummy file
40# is defined here.
41
42local dummyFile = "dummy.dat" ;
43
44local dumpExportRepositoryBulkListerTargetFile =
45	[ FDirName $(dumpExportRepositoryBulkListerTargetDirectory) $(dummyFile) ] ;
46local dumpExportPkgBulkListenerTargetFile =
47	[ FDirName $(dumpExportPkgBulkListenerTargetDirectory) $(dummyFile) ] ;
48local dumpExportReferenceListenerTargetFile =
49	[ FDirName $(dumpExportReferenceListenerTargetDirectory) $(dummyFile) ] ;
50
51local dumpExportPkgModelTargetFile =
52	[ FDirName $(dumpExportPkgModelTargetDirectory) $(dummyFile) ] ;
53local dumpExportRepositoryModelTargetFile =
54	[ FDirName $(dumpExportRepositoryModelTargetDirectory) $(dummyFile) ] ;
55local dumpExportReferenceModelTargetFile =
56	[ FDirName $(dumpExportReferenceModelTargetDirectory) $(dummyFile) ] ;
57
58# source directories
59local sourceDirs =
60	edits_generic
61	model
62	packagemanagement
63	process
64	textview
65	ui
66	ui_generic
67	server
68	tar
69	util
70;
71
72local sourceDir ;
73for sourceDir in $(sourceDirs) {
74	SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src apps haikudepot $(sourceDir) ] ;
75}
76
77SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src servers package ] ;
78
79SEARCH_SOURCE += $(dumpExportRepositoryBulkListerTargetDirectory) ;
80SEARCH_SOURCE += $(dumpExportPkgBulkListenerTargetDirectory) ;
81SEARCH_SOURCE += $(dumpExportReferenceListenerTargetDirectory) ;
82
83SEARCH_SOURCE += $(dumpExportPkgModelTargetDirectory) ;
84SEARCH_SOURCE += $(dumpExportRepositoryModelTargetDirectory) ;
85SEARCH_SOURCE += $(dumpExportReferenceModelTargetDirectory) ;
86
87local textDocumentSources =
88	# edits_generic
89	CompoundEdit.cpp
90	EditContext.cpp
91	EditManager.cpp
92	UndoableEdit.cpp
93
94	# textview
95	Bullet.cpp
96	BulletData.cpp
97	CharacterStyle.cpp
98	CharacterStyleData.cpp
99	MarkupParser.cpp
100	Paragraph.cpp
101	ParagraphLayout.cpp
102	ParagraphStyle.cpp
103	ParagraphStyleData.cpp
104	TextDocument.cpp
105	TextDocumentLayout.cpp
106	TextDocumentView.cpp
107	TextEditor.cpp
108	TextListener.cpp
109	TextSelection.cpp
110	TextSpan.cpp
111	TextView.cpp
112	UndoableEditListener.cpp
113;
114
115local applicationSources =
116	App.cpp
117	BarberPole.cpp
118	BitmapView.cpp
119	Captcha.cpp
120	CreateUserDetail.cpp
121	DecisionProvider.cpp
122	DeskbarLink.cpp
123	FeaturedPackagesView.cpp
124	FilterView.cpp
125	GeneralContentScrollView.cpp
126	IconTarPtr.cpp
127	IncrementViewCounterProcess.cpp
128	JobStateListener.cpp
129	LanguageModel.cpp
130	LinkView.cpp
131	LinkedBitmapView.cpp
132	Logger.cpp
133	main.cpp
134	MainWindow.cpp
135	MarkupTextView.cpp
136	MessagePackageListener.cpp
137	Model.cpp
138	PackageContentsView.cpp
139	PackageIconTarRepository.cpp
140	PackageInfo.cpp
141	PackageInfoListener.cpp
142	PackageInfoView.cpp
143	PackageListView.cpp
144	RatePackageWindow.cpp
145	RatingView.cpp
146	RatingStability.cpp
147	RatingUtils.cpp
148	support.cpp
149	ScreenshotWindow.cpp
150	ScrollableGroupView.cpp
151	SettingsWindow.cpp
152	SharedBitmap.cpp
153	ShuttingDownWindow.cpp
154	ToLatestUserUsageConditionsWindow.cpp
155	UserCredentials.cpp
156	UserDetail.cpp
157	UserLoginWindow.cpp
158	UserUsageConditions.cpp
159	UserUsageConditionsWindow.cpp
160	ValidationFailure.cpp
161	ValidationUtils.cpp
162	WorkStatusView.cpp
163
164	# packagemanagement
165	AbstractPackageProcess.cpp
166	InstallPackageProcess.cpp
167	OpenPackageProcess.cpp
168	PackageAction.cpp
169	PackageManager.cpp
170	UninstallPackageProcess.cpp
171
172	# network + server / local processes
173	AbstractProcess.cpp
174	AbstractProcessNode.cpp
175	AbstractServerProcess.cpp
176	AbstractSingleFileServerProcess.cpp
177	LocalPkgDataLoadProcess.cpp
178	LocalRepositoryUpdateProcess.cpp
179	ProcessCoordinator.cpp
180	ProcessCoordinatorFactory.cpp
181	ServerHelper.cpp
182	ServerSettings.cpp
183	ServerPkgDataUpdateProcess.cpp
184	ServerReferenceDataUpdateProcess.cpp
185	ServerRepositoryDataUpdateProcess.cpp
186	ServerIconExportUpdateProcess.cpp
187	StandardMetaDataJsonEventListener.cpp
188	StandardMetaData.cpp
189	ThreadedProcessNode.cpp
190	UserDetailVerifierProcess.cpp
191	WebAppInterface.cpp
192
193	# tar
194	TarArchiveHeader.cpp
195	TarArchiveService.cpp
196
197	# util
198	AppUtils.cpp
199	DataIOUtils.cpp
200	LanguageMenuUtils.cpp
201	LocaleUtils.cpp
202	PackageUtils.cpp
203	RepositoryUrlUtils.cpp
204	StorageUtils.cpp
205	LoggingUrlProtocolListener.cpp
206
207	# package_daemon
208	ProblemWindow.cpp
209	ResultWindow.cpp
210;
211
212local generatedPkgModelSourceFiles =
213	DumpExportPkg.cpp
214	DumpExportPkgCategory.cpp
215	DumpExportPkgScreenshot.cpp
216	DumpExportPkgVersion.cpp
217;
218
219local generatedRepositoryModelSourceFiles =
220	DumpExportRepository.cpp
221	DumpExportRepositorySource.cpp
222	DumpExportRepositorySourceMirror.cpp
223;
224
225local generatedReferenceModelSourceFiles =
226	DumpExportReference.cpp
227	DumpExportReferenceNaturalLanguage.cpp
228	DumpExportReferencePkgCategory.cpp
229	DumpExportReferenceUserRatingStability.cpp
230	DumpExportReferenceCountry.cpp
231;
232
233local generatedPkgParserSourceFiles =
234	DumpExportPkgJsonListener.cpp
235;
236
237local generatedRepositoryParserSourceFiles =
238	DumpExportRepositoryJsonListener.cpp
239;
240
241local generatedReferenceParserSourceFiles =
242	DumpExportReferenceJsonListener.cpp
243;
244
245Application HaikuDepot
246	:
247	$(applicationSources)
248	$(textDocumentSources)
249	$(generatedPkgModelSourceFiles)
250	$(generatedRepositoryModelSourceFiles)
251	$(generatedReferenceModelSourceFiles)
252	$(generatedPkgParserSourceFiles)
253	$(generatedRepositoryParserSourceFiles)
254	$(generatedReferenceParserSourceFiles)
255	:
256	be package bnetapi translation libnetservices.a libcolumnlistview.a shared
257	[ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub
258	:
259	HaikuDepot.rdef
260;
261
262DoCatalogs HaikuDepot :
263	x-vnd.Haiku-HaikuDepot
264	:
265	App.cpp
266	FeaturedPackagesView.cpp
267	FilterView.cpp
268	LocaleUtils.cpp
269	LocalPkgDataLoadProcess.cpp
270	LocalRepositoryUpdateProcess.cpp
271	MainWindow.cpp
272	Model.cpp
273	PackageContentsView.cpp
274	PackageInfoView.cpp
275	PackageListView.cpp
276	PackageManager.cpp
277	ProcessCoordinator.cpp
278	RatePackageWindow.cpp
279	ScreenshotWindow.cpp
280	ServerHelper.cpp
281	ServerIconExportUpdateProcess.cpp
282	ServerPkgDataUpdateProcess.cpp
283	ServerReferenceDataUpdateProcess.cpp
284	ServerRepositoryDataUpdateProcess.cpp
285	SettingsWindow.cpp
286	UserLoginWindow.cpp
287	WorkStatusView.cpp
288;
289
290# The following use of rules configures the generation of .cpp and .h files from
291# JSON schemas that are defined in the HaikuDepotServer system.  See the
292# included Jam rules and actions for the definitions.
293
294HdsSchemaGenModel $(dumpExportPkgModelTargetFile)
295	: dumpexportpkg.json : jsonschema2cppmodel.py ;
296
297HdsSchemaGenModel $(dumpExportRepositoryModelTargetFile)
298	: dumpexportrepository.json : jsonschema2cppmodel.py ;
299
300HdsSchemaGenModel $(dumpExportReferenceModelTargetFile)
301	: dumpexportreference.json : jsonschema2cppmodel.py ;
302
303HdsSchemaGenBulkParser $(dumpExportRepositoryBulkListerTargetFile)
304	: dumpexportrepository.json : jsonschema2cppparser.py ;
305
306HdsSchemaGenBulkParser $(dumpExportPkgBulkListenerTargetFile)
307	: dumpexportpkg.json : jsonschema2cppparser.py ;
308
309HdsSchemaGenParser $(dumpExportReferenceListenerTargetFile)
310	: dumpexportreference.json : jsonschema2cppparser.py ;
311
312HdsSchemaGenAppSrcDependsOnGeneration
313	[ FGristFiles $(generatedPkgParserSourceFiles) ]
314	[ FGristFiles $(generatedPkgParserSourceFiles:S=.h) ]
315	: $(dumpExportPkgBulkListenerTargetFile) ;
316
317HdsSchemaGenAppSrcDependsOnGeneration
318	[ FGristFiles $(generatedRepositoryParserSourceFiles) ]
319	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
320	: $(dumpExportRepositoryBulkListerTargetFile) ;
321
322HdsSchemaGenAppSrcDependsOnGeneration
323	[ FGristFiles $(generatedReferenceParserSourceFiles) ]
324	[ FGristFiles $(generatedReferenceParserSourceFiles:S=.h) ]
325	: $(dumpExportReferenceListenerTargetFile) ;
326
327HdsSchemaGenAppSrcDependsOnGeneration
328	[ FGristFiles $(generatedRepositoryModelSourceFiles) ]
329	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
330	: $(dumpExportRepositoryModelTargetFile) ;
331
332HdsSchemaGenAppSrcDependsOnGeneration
333	[ FGristFiles $(generatedPkgModelSourceFiles) ]
334	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
335	: $(dumpExportPkgModelTargetFile) ;
336
337HdsSchemaGenAppSrcDependsOnGeneration
338	[ FGristFiles $(generatedReferenceModelSourceFiles) ]
339	[ FGristFiles $(generatedReferenceModelSourceFiles:S=.h) ]
340	: $(dumpExportReferenceModelTargetFile) ;
341
342# This will ensure that if any of the generated files' header files change, then
343# the application should be re-built.
344
345Depends [ FGristFiles $(applicationSources:S=.o) ]
346	:
347	[ FGristFiles $(generatedPkgParserSourceFiles:S=.h) ]
348	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
349	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
350	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
351	[ FGristFiles $(generatedReferenceParserSourceFiles:S=.h) ]
352	[ FGristFiles $(generatedReferenceModelSourceFiles:S=.h) ]
353;
354