xref: /haiku/src/apps/haikudepot/Jamfile (revision e673363df19a9479e524b26b518b576bec44c915)
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	RepositoryUrlUtils.cpp
203	StorageUtils.cpp
204	LoggingUrlProtocolListener.cpp
205
206	# package_daemon
207	ProblemWindow.cpp
208	ResultWindow.cpp
209;
210
211local generatedPkgModelSourceFiles =
212	DumpExportPkg.cpp
213	DumpExportPkgCategory.cpp
214	DumpExportPkgScreenshot.cpp
215	DumpExportPkgVersion.cpp
216;
217
218local generatedRepositoryModelSourceFiles =
219	DumpExportRepository.cpp
220	DumpExportRepositorySource.cpp
221	DumpExportRepositorySourceMirror.cpp
222;
223
224local generatedReferenceModelSourceFiles =
225	DumpExportReference.cpp
226	DumpExportReferenceNaturalLanguage.cpp
227	DumpExportReferencePkgCategory.cpp
228	DumpExportReferenceUserRatingStability.cpp
229	DumpExportReferenceCountry.cpp
230;
231
232local generatedPkgParserSourceFiles =
233	DumpExportPkgJsonListener.cpp
234;
235
236local generatedRepositoryParserSourceFiles =
237	DumpExportRepositoryJsonListener.cpp
238;
239
240local generatedReferenceParserSourceFiles =
241	DumpExportReferenceJsonListener.cpp
242;
243
244Application HaikuDepot
245	:
246	$(applicationSources)
247	$(textDocumentSources)
248	$(generatedPkgModelSourceFiles)
249	$(generatedRepositoryModelSourceFiles)
250	$(generatedReferenceModelSourceFiles)
251	$(generatedPkgParserSourceFiles)
252	$(generatedRepositoryParserSourceFiles)
253	$(generatedReferenceParserSourceFiles)
254	:
255	be package bnetapi translation libnetservices.a libcolumnlistview.a shared
256	[ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub
257	:
258	HaikuDepot.rdef
259;
260
261DoCatalogs HaikuDepot :
262	x-vnd.Haiku-HaikuDepot
263	:
264	App.cpp
265	FeaturedPackagesView.cpp
266	FilterView.cpp
267	LocaleUtils.cpp
268	LocalPkgDataLoadProcess.cpp
269	LocalRepositoryUpdateProcess.cpp
270	MainWindow.cpp
271	Model.cpp
272	PackageContentsView.cpp
273	PackageInfoView.cpp
274	PackageListView.cpp
275	PackageManager.cpp
276	ProcessCoordinator.cpp
277	RatePackageWindow.cpp
278	ScreenshotWindow.cpp
279	ServerHelper.cpp
280	ServerIconExportUpdateProcess.cpp
281	ServerPkgDataUpdateProcess.cpp
282	ServerReferenceDataUpdateProcess.cpp
283	ServerRepositoryDataUpdateProcess.cpp
284	SettingsWindow.cpp
285	UserLoginWindow.cpp
286	WorkStatusView.cpp
287;
288
289# The following use of rules configures the generation of .cpp and .h files from
290# JSON schemas that are defined in the HaikuDepotServer system.  See the
291# included Jam rules and actions for the definitions.
292
293HdsSchemaGenModel $(dumpExportPkgModelTargetFile)
294	: dumpexportpkg.json : jsonschema2cppmodel.py ;
295
296HdsSchemaGenModel $(dumpExportRepositoryModelTargetFile)
297	: dumpexportrepository.json : jsonschema2cppmodel.py ;
298
299HdsSchemaGenModel $(dumpExportReferenceModelTargetFile)
300	: dumpexportreference.json : jsonschema2cppmodel.py ;
301
302HdsSchemaGenBulkParser $(dumpExportRepositoryBulkListerTargetFile)
303	: dumpexportrepository.json : jsonschema2cppparser.py ;
304
305HdsSchemaGenBulkParser $(dumpExportPkgBulkListenerTargetFile)
306	: dumpexportpkg.json : jsonschema2cppparser.py ;
307
308HdsSchemaGenParser $(dumpExportReferenceListenerTargetFile)
309	: dumpexportreference.json : jsonschema2cppparser.py ;
310
311HdsSchemaGenAppSrcDependsOnGeneration
312	[ FGristFiles $(generatedPkgParserSourceFiles) ]
313	[ FGristFiles $(generatedPkgParserSourceFiles:S=.h) ]
314	: $(dumpExportPkgBulkListenerTargetFile) ;
315
316HdsSchemaGenAppSrcDependsOnGeneration
317	[ FGristFiles $(generatedRepositoryParserSourceFiles) ]
318	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
319	: $(dumpExportRepositoryBulkListerTargetFile) ;
320
321HdsSchemaGenAppSrcDependsOnGeneration
322	[ FGristFiles $(generatedReferenceParserSourceFiles) ]
323	[ FGristFiles $(generatedReferenceParserSourceFiles:S=.h) ]
324	: $(dumpExportReferenceListenerTargetFile) ;
325
326HdsSchemaGenAppSrcDependsOnGeneration
327	[ FGristFiles $(generatedRepositoryModelSourceFiles) ]
328	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
329	: $(dumpExportRepositoryModelTargetFile) ;
330
331HdsSchemaGenAppSrcDependsOnGeneration
332	[ FGristFiles $(generatedPkgModelSourceFiles) ]
333	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
334	: $(dumpExportPkgModelTargetFile) ;
335
336HdsSchemaGenAppSrcDependsOnGeneration
337	[ FGristFiles $(generatedReferenceModelSourceFiles) ]
338	[ FGristFiles $(generatedReferenceModelSourceFiles:S=.h) ]
339	: $(dumpExportReferenceModelTargetFile) ;
340
341# This will ensure that if any of the generated files' header files change, then
342# the application should be re-built.
343
344Depends [ FGristFiles $(applicationSources:S=.o) ]
345	:
346	[ FGristFiles $(generatedPkgParserSourceFiles:S=.h) ]
347	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
348	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
349	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
350	[ FGristFiles $(generatedReferenceParserSourceFiles:S=.h) ]
351	[ FGristFiles $(generatedReferenceModelSourceFiles:S=.h) ]
352;
353