xref: /haiku/src/apps/haikudepot/Jamfile (revision cbe0a0c436162d78cc3f92a305b64918c839d079)
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	IconTarPtr.cpp
126	IncrementViewCounterProcess.cpp
127	JobStateListener.cpp
128	LanguageModel.cpp
129	LinkView.cpp
130	LinkedBitmapView.cpp
131	Logger.cpp
132	main.cpp
133	MainWindow.cpp
134	MarkupTextView.cpp
135	MessagePackageListener.cpp
136	Model.cpp
137	PackageContentsView.cpp
138	PackageIconTarRepository.cpp
139	PackageInfo.cpp
140	PackageInfoListener.cpp
141	PackageInfoView.cpp
142	PackageListView.cpp
143	RatePackageWindow.cpp
144	RatingView.cpp
145	RatingStability.cpp
146	RatingUtils.cpp
147	support.cpp
148	ScreenshotWindow.cpp
149	ScrollableGroupView.cpp
150	SettingsWindow.cpp
151	SharedBitmap.cpp
152	ShuttingDownWindow.cpp
153	ToLatestUserUsageConditionsWindow.cpp
154	UserCredentials.cpp
155	UserDetail.cpp
156	UserLoginWindow.cpp
157	UserUsageConditions.cpp
158	UserUsageConditionsWindow.cpp
159	ValidationFailure.cpp
160	ValidationUtils.cpp
161	WorkStatusView.cpp
162
163	# packagemanagement
164	AbstractPackageProcess.cpp
165	InstallPackageProcess.cpp
166	OpenPackageProcess.cpp
167	PackageAction.cpp
168	PackageManager.cpp
169	UninstallPackageProcess.cpp
170
171	# network + server / local processes
172	AbstractProcess.cpp
173	AbstractProcessNode.cpp
174	AbstractServerProcess.cpp
175	AbstractSingleFileServerProcess.cpp
176	LocalPkgDataLoadProcess.cpp
177	LocalRepositoryUpdateProcess.cpp
178	ProcessCoordinator.cpp
179	ProcessCoordinatorFactory.cpp
180	ServerHelper.cpp
181	ServerSettings.cpp
182	ServerPkgDataUpdateProcess.cpp
183	ServerReferenceDataUpdateProcess.cpp
184	ServerRepositoryDataUpdateProcess.cpp
185	ServerIconExportUpdateProcess.cpp
186	StandardMetaDataJsonEventListener.cpp
187	StandardMetaData.cpp
188	ThreadedProcessNode.cpp
189	UserDetailVerifierProcess.cpp
190	WebAppInterface.cpp
191
192	# tar
193	TarArchiveHeader.cpp
194	TarArchiveService.cpp
195
196	# util
197	AppUtils.cpp
198	DataIOUtils.cpp
199	LanguageMenuUtils.cpp
200	LocaleUtils.cpp
201	RepositoryUrlUtils.cpp
202	StorageUtils.cpp
203	LoggingUrlProtocolListener.cpp
204
205	# package_daemon
206	ProblemWindow.cpp
207	ResultWindow.cpp
208;
209
210local generatedPkgModelSourceFiles =
211	DumpExportPkg.cpp
212	DumpExportPkgCategory.cpp
213	DumpExportPkgScreenshot.cpp
214	DumpExportPkgVersion.cpp
215;
216
217local generatedRepositoryModelSourceFiles =
218	DumpExportRepository.cpp
219	DumpExportRepositorySource.cpp
220	DumpExportRepositorySourceMirror.cpp
221;
222
223local generatedReferenceModelSourceFiles =
224	DumpExportReference.cpp
225	DumpExportReferenceNaturalLanguage.cpp
226	DumpExportReferencePkgCategory.cpp
227	DumpExportReferenceUserRatingStability.cpp
228	DumpExportReferenceCountry.cpp
229;
230
231local generatedPkgParserSourceFiles =
232	DumpExportPkgJsonListener.cpp
233;
234
235local generatedRepositoryParserSourceFiles =
236	DumpExportRepositoryJsonListener.cpp
237;
238
239local generatedReferenceParserSourceFiles =
240	DumpExportReferenceJsonListener.cpp
241;
242
243Application HaikuDepot
244	:
245	$(applicationSources)
246	$(textDocumentSources)
247	$(generatedPkgModelSourceFiles)
248	$(generatedRepositoryModelSourceFiles)
249	$(generatedReferenceModelSourceFiles)
250	$(generatedPkgParserSourceFiles)
251	$(generatedRepositoryParserSourceFiles)
252	$(generatedReferenceParserSourceFiles)
253	:
254	be package bnetapi translation libnetservices.a libcolumnlistview.a shared
255	[ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub
256	:
257	HaikuDepot.rdef
258;
259
260DoCatalogs HaikuDepot :
261	x-vnd.Haiku-HaikuDepot
262	:
263	App.cpp
264	FeaturedPackagesView.cpp
265	FilterView.cpp
266	LocaleUtils.cpp
267	LocalPkgDataLoadProcess.cpp
268	LocalRepositoryUpdateProcess.cpp
269	MainWindow.cpp
270	Model.cpp
271	PackageContentsView.cpp
272	PackageInfoView.cpp
273	PackageListView.cpp
274	PackageManager.cpp
275	ProcessCoordinator.cpp
276	RatePackageWindow.cpp
277	ScreenshotWindow.cpp
278	ServerHelper.cpp
279	ServerIconExportUpdateProcess.cpp
280	ServerPkgDataUpdateProcess.cpp
281	ServerReferenceDataUpdateProcess.cpp
282	ServerRepositoryDataUpdateProcess.cpp
283	SettingsWindow.cpp
284	UserLoginWindow.cpp
285	WorkStatusView.cpp
286;
287
288# The following use of rules configures the generation of .cpp and .h files from
289# JSON schemas that are defined in the HaikuDepotServer system.  See the
290# included Jam rules and actions for the definitions.
291
292HdsSchemaGenModel $(dumpExportPkgModelTargetFile)
293	: dumpexportpkg.json : jsonschema2cppmodel.py ;
294
295HdsSchemaGenModel $(dumpExportRepositoryModelTargetFile)
296	: dumpexportrepository.json : jsonschema2cppmodel.py ;
297
298HdsSchemaGenModel $(dumpExportReferenceModelTargetFile)
299	: dumpexportreference.json : jsonschema2cppmodel.py ;
300
301HdsSchemaGenBulkParser $(dumpExportRepositoryBulkListerTargetFile)
302	: dumpexportrepository.json : jsonschema2cppparser.py ;
303
304HdsSchemaGenBulkParser $(dumpExportPkgBulkListenerTargetFile)
305	: dumpexportpkg.json : jsonschema2cppparser.py ;
306
307HdsSchemaGenParser $(dumpExportReferenceListenerTargetFile)
308	: dumpexportreference.json : jsonschema2cppparser.py ;
309
310HdsSchemaGenAppSrcDependsOnGeneration
311	[ FGristFiles $(generatedPkgParserSourceFiles) ]
312	[ FGristFiles $(generatedPkgParserSourceFiles:S=.h) ]
313	: $(dumpExportPkgBulkListenerTargetFile) ;
314
315HdsSchemaGenAppSrcDependsOnGeneration
316	[ FGristFiles $(generatedRepositoryParserSourceFiles) ]
317	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
318	: $(dumpExportRepositoryBulkListerTargetFile) ;
319
320HdsSchemaGenAppSrcDependsOnGeneration
321	[ FGristFiles $(generatedReferenceParserSourceFiles) ]
322	[ FGristFiles $(generatedReferenceParserSourceFiles:S=.h) ]
323	: $(dumpExportReferenceListenerTargetFile) ;
324
325HdsSchemaGenAppSrcDependsOnGeneration
326	[ FGristFiles $(generatedRepositoryModelSourceFiles) ]
327	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
328	: $(dumpExportRepositoryModelTargetFile) ;
329
330HdsSchemaGenAppSrcDependsOnGeneration
331	[ FGristFiles $(generatedPkgModelSourceFiles) ]
332	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
333	: $(dumpExportPkgModelTargetFile) ;
334
335HdsSchemaGenAppSrcDependsOnGeneration
336	[ FGristFiles $(generatedReferenceModelSourceFiles) ]
337	[ FGristFiles $(generatedReferenceModelSourceFiles:S=.h) ]
338	: $(dumpExportReferenceModelTargetFile) ;
339
340# This will ensure that if any of the generated files' header files change, then
341# the application should be re-built.
342
343Depends [ FGristFiles $(applicationSources:S=.o) ]
344	:
345	[ FGristFiles $(generatedPkgParserSourceFiles:S=.h) ]
346	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
347	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
348	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
349	[ FGristFiles $(generatedReferenceParserSourceFiles:S=.h) ]
350	[ FGristFiles $(generatedReferenceModelSourceFiles:S=.h) ]
351;
352