xref: /haiku/src/apps/haikudepot/Jamfile (revision 909af08f4328301fbdef1ffb41f566c3b5bec0c7)
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	packagemodel
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 $(SUBDIR) $(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	AccessToken.cpp
118	BitmapHolder.cpp
119	BitmapView.cpp
120	Captcha.cpp
121	CreateUserDetail.cpp
122	DecisionProvider.cpp
123	DeskbarLink.cpp
124	FeaturedPackagesView.cpp
125	FilterView.cpp
126	GeneralContentScrollView.cpp
127	IconTarPtr.cpp
128	IncrementViewCounterProcess.cpp
129	JobStateListener.cpp
130	JwtTokenHelper.cpp
131	LanguageRepository.cpp
132	LinkView.cpp
133	LinkedBitmapView.cpp
134	Logger.cpp
135	main.cpp
136	MainWindow.cpp
137	MarkupTextView.cpp
138	MessagePackageListener.cpp
139	Model.cpp
140	PackageContentsView.cpp
141	PackageIconTarRepository.cpp
142	PackageInfoListener.cpp
143	PackageInfoView.cpp
144	PackageListView.cpp
145	PackageScreenshotRepository.cpp
146	PasswordRequirements.cpp
147	RatePackageWindow.cpp
148	RatingView.cpp
149	RatingStability.cpp
150	RatingUtils.cpp
151	support.cpp
152	ScreenshotWindow.cpp
153	ScreenshotCoordinate.cpp
154	ScrollableGroupView.cpp
155	SettingsWindow.cpp
156	SharedIcons.cpp
157	ShuttingDownWindow.cpp
158	ToLatestUserUsageConditionsWindow.cpp
159	UserCredentials.cpp
160	UserDetail.cpp
161	UserLoginWindow.cpp
162	UserUsageConditions.cpp
163	UserUsageConditionsWindow.cpp
164	ValidationFailure.cpp
165	ValidationUtils.cpp
166	WorkStatusView.cpp
167
168	# packagemanagement
169	AbstractPackageProcess.cpp
170	InstallPackageProcess.cpp
171	OpenPackageProcess.cpp
172	PackageAction.cpp
173	PackageManager.cpp
174	UninstallPackageProcess.cpp
175
176	#packagemodel
177	DepotInfo.cpp
178	Language.cpp
179	PackageCategory.cpp
180	PackageFilter.cpp
181	PackageFilterModel.cpp
182	PackageInfo.cpp
183	PublisherInfo.cpp
184	RatingSummary.cpp
185	ScreenshotInfo.cpp
186	UserInfo.cpp
187	UserRating.cpp
188
189	# network + server / local processes
190	AbstractProcess.cpp
191	AbstractProcessNode.cpp
192	AbstractServerProcess.cpp
193	AbstractSingleFileServerProcess.cpp
194	CacheScreenshotProcess.cpp
195	LocalPkgDataLoadProcess.cpp
196	LocalRepositoryUpdateProcess.cpp
197	PopulatePkgChangelogFromServerProcess.cpp
198	PopulatePkgSizesProcess.cpp
199	PopulatePkgUserRatingsFromServerProcess.cpp
200	ProcessCoordinator.cpp
201	ProcessCoordinatorFactory.cpp
202	ServerHelper.cpp
203	ServerSettings.cpp
204	ServerPkgDataUpdateProcess.cpp
205	ServerReferenceDataUpdateProcess.cpp
206	ServerRepositoryDataUpdateProcess.cpp
207	ServerIconExportUpdateProcess.cpp
208	StandardMetaDataJsonEventListener.cpp
209	StandardMetaData.cpp
210	ThreadedProcessNode.cpp
211	UserDetailVerifierProcess.cpp
212	WebAppInterface.cpp
213
214	# tar
215	TarArchiveHeader.cpp
216	TarArchiveService.cpp
217
218	# util
219	AppUtils.cpp
220	DataIOUtils.cpp
221	LanguageMenuUtils.cpp
222	LocaleUtils.cpp
223	PackageUtils.cpp
224	StorageUtils.cpp
225	StringUtils.cpp
226	LoggingUrlProtocolListener.cpp
227
228	# package_daemon
229	ProblemWindow.cpp
230	ResultWindow.cpp
231;
232
233local generatedPkgModelSourceFiles =
234	DumpExportPkg.cpp
235	DumpExportPkgCategory.cpp
236	DumpExportPkgScreenshot.cpp
237	DumpExportPkgVersion.cpp
238;
239
240local generatedRepositoryModelSourceFiles =
241	DumpExportRepository.cpp
242	DumpExportRepositorySource.cpp
243	DumpExportRepositorySourceMirror.cpp
244;
245
246local generatedReferenceModelSourceFiles =
247	DumpExportReference.cpp
248	DumpExportReferenceNaturalLanguage.cpp
249	DumpExportReferencePkgCategory.cpp
250	DumpExportReferenceUserRatingStability.cpp
251	DumpExportReferenceCountry.cpp
252;
253
254local generatedPkgParserSourceFiles =
255	DumpExportPkgJsonListener.cpp
256;
257
258local generatedRepositoryParserSourceFiles =
259	DumpExportRepositoryJsonListener.cpp
260;
261
262local generatedReferenceParserSourceFiles =
263	DumpExportReferenceJsonListener.cpp
264;
265
266Application HaikuDepot
267	:
268	$(applicationSources)
269	$(textDocumentSources)
270	$(generatedPkgModelSourceFiles)
271	$(generatedRepositoryModelSourceFiles)
272	$(generatedReferenceModelSourceFiles)
273	$(generatedPkgParserSourceFiles)
274	$(generatedRepositoryParserSourceFiles)
275	$(generatedReferenceParserSourceFiles)
276	:
277	be package bnetapi translation libnetservices.a libcolumnlistview.a shared
278	[ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub
279	:
280	HaikuDepot.rdef
281;
282
283DoCatalogs HaikuDepot :
284	x-vnd.Haiku-HaikuDepot
285	:
286	$(applicationSources)
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