xref: /haiku/src/apps/haikudepot/Jamfile (revision 6f80a9801fedbe7355c4360bd204ba746ec3ec2d)
1SubDir HAIKU_TOP src apps haikudepot ;
2
3# disable -Werror for this directory only
4SubDirC++Flags -Wno-error ;
5
6include [ FDirName $(SUBDIR) build jam HdsSchemaGenRules ] ;
7
8UsePrivateHeaders interface kernel net netservices package shared storage ;
9UsePrivateHeaders support locale ;
10
11HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY = $(TARGET_COMMON_DEBUG_LOCATE_TARGET) ;
12
13# During the build process, some sources are generated into directories.  These
14# are the directories.
15
16local dumpExportRepositoryBulkListerTargetDirectory =
17	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
18		dumpexportrepositorybulklistener ] ;
19local dumpExportPkgBulkListenerTargetDirectory =
20	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
21		dumpexportpkgbulklistener ] ;
22local dumpExportReferenceListenerTargetDirectory =
23	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
24		dumpexportreferencelistener ] ;
25
26local dumpExportPkgModelTargetDirectory =
27	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
28		dumpexportpkgmodel ] ;
29local dumpExportRepositoryModelTargetDirectory =
30	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
31		dumpexportrepositorymodel ] ;
32local dumpExportReferenceModelTargetDirectory =
33	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
34		dumpexportreferencemodel ] ;
35
36# During the build process, some sources are generated into a directory.  In
37# order to maintain a timestamp on that generation process, a dummy file is
38# used to signify the target of the generation.  The leafname of this dummy file
39# is defined here.
40
41local dummyFile = "dummy.dat" ;
42
43local dumpExportRepositoryBulkListerTargetFile =
44	[ FDirName $(dumpExportRepositoryBulkListerTargetDirectory) $(dummyFile) ] ;
45local dumpExportPkgBulkListenerTargetFile =
46	[ FDirName $(dumpExportPkgBulkListenerTargetDirectory) $(dummyFile) ] ;
47local dumpExportReferenceListenerTargetFile =
48	[ FDirName $(dumpExportReferenceListenerTargetDirectory) $(dummyFile) ] ;
49
50local dumpExportPkgModelTargetFile =
51	[ FDirName $(dumpExportPkgModelTargetDirectory) $(dummyFile) ] ;
52local dumpExportRepositoryModelTargetFile =
53	[ FDirName $(dumpExportRepositoryModelTargetDirectory) $(dummyFile) ] ;
54local dumpExportReferenceModelTargetFile =
55	[ FDirName $(dumpExportReferenceModelTargetDirectory) $(dummyFile) ] ;
56
57# source directories
58local sourceDirs =
59	edits_generic
60	model
61	packagemanagement
62	process
63	textview
64	ui
65	ui_generic
66	server
67	tar
68	util
69;
70
71local sourceDir ;
72for sourceDir in $(sourceDirs) {
73	SEARCH_SOURCE += [ FDirName $(SUBDIR) $(sourceDir) ] ;
74}
75
76SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src servers package ] ;
77
78SEARCH_SOURCE += $(dumpExportRepositoryBulkListerTargetDirectory) ;
79SEARCH_SOURCE += $(dumpExportPkgBulkListenerTargetDirectory) ;
80SEARCH_SOURCE += $(dumpExportReferenceListenerTargetDirectory) ;
81
82SEARCH_SOURCE += $(dumpExportPkgModelTargetDirectory) ;
83SEARCH_SOURCE += $(dumpExportRepositoryModelTargetDirectory) ;
84SEARCH_SOURCE += $(dumpExportReferenceModelTargetDirectory) ;
85
86local textDocumentSources =
87	# edits_generic
88	CompoundEdit.cpp
89	EditContext.cpp
90	EditManager.cpp
91	UndoableEdit.cpp
92
93	# textview
94	Bullet.cpp
95	BulletData.cpp
96	CharacterStyle.cpp
97	CharacterStyleData.cpp
98	MarkupParser.cpp
99	Paragraph.cpp
100	ParagraphLayout.cpp
101	ParagraphStyle.cpp
102	ParagraphStyleData.cpp
103	TextDocument.cpp
104	TextDocumentLayout.cpp
105	TextDocumentView.cpp
106	TextEditor.cpp
107	TextListener.cpp
108	TextSelection.cpp
109	TextSpan.cpp
110	TextView.cpp
111	UndoableEditListener.cpp
112;
113
114local applicationSources =
115	App.cpp
116	BarberPole.cpp
117	BitmapView.cpp
118	Captcha.cpp
119	CreateUserDetail.cpp
120	DecisionProvider.cpp
121	DeskbarLink.cpp
122	FeaturedPackagesView.cpp
123	FilterView.cpp
124	GeneralContentScrollView.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	PackageUtils.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	: $(dumpExportPkgBulkListenerTargetDirectory)
315	: $(dumpExportPkgBulkListenerTargetFile) ;
316
317HdsSchemaGenAppSrcDependsOnGeneration
318	[ FGristFiles $(generatedRepositoryParserSourceFiles) ]
319	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
320	: $(dumpExportRepositoryBulkListerTargetDirectory)
321	: $(dumpExportRepositoryBulkListerTargetFile) ;
322
323HdsSchemaGenAppSrcDependsOnGeneration
324	[ FGristFiles $(generatedReferenceParserSourceFiles) ]
325	[ FGristFiles $(generatedReferenceParserSourceFiles:S=.h) ]
326	: $(dumpExportReferenceListenerTargetDirectory)
327	: $(dumpExportReferenceListenerTargetFile) ;
328
329HdsSchemaGenAppSrcDependsOnGeneration
330	[ FGristFiles $(generatedRepositoryModelSourceFiles) ]
331	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
332	: $(dumpExportRepositoryModelTargetDirectory)
333	: $(dumpExportRepositoryModelTargetFile) ;
334
335HdsSchemaGenAppSrcDependsOnGeneration
336	[ FGristFiles $(generatedPkgModelSourceFiles) ]
337	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
338	: $(dumpExportPkgModelTargetDirectory)
339	: $(dumpExportPkgModelTargetFile) ;
340
341HdsSchemaGenAppSrcDependsOnGeneration
342	[ FGristFiles $(generatedReferenceModelSourceFiles) ]
343	[ FGristFiles $(generatedReferenceModelSourceFiles:S=.h) ]
344	: $(dumpExportReferenceModelTargetDirectory)
345	: $(dumpExportReferenceModelTargetFile) ;
346
347# This will ensure that if any of the generated files' header files change, then
348# the application should be re-built.
349
350Includes [ FGristFiles $(applicationSources) ]
351	:
352	$(dumpExportRepositoryBulkListerTargetDirectory)
353	$(dumpExportPkgBulkListenerTargetDirectory)
354	$(dumpExportReferenceListenerTargetDirectory)
355	$(dumpExportPkgModelTargetDirectory)
356	$(dumpExportRepositoryModelTargetDirectory)
357	$(dumpExportReferenceModelTargetDirectory)
358;
359
360Depends [ FGristFiles $(applicationSources:S=.o) ]
361	:
362	[ FGristFiles $(generatedPkgParserSourceFiles:S=.h) ]
363	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
364	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
365	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
366	[ FGristFiles $(generatedReferenceParserSourceFiles:S=.h) ]
367	[ FGristFiles $(generatedReferenceModelSourceFiles:S=.h) ]
368;
369