xref: /haiku/src/apps/haikudepot/Jamfile (revision 344ded80d400028c8f561b4b876257b94c12db4a)
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	PackageClassificationInfo.cpp
181	PackageFilter.cpp
182	PackageFilterModel.cpp
183	PackageInfo.cpp
184	PackageLocalInfo.cpp
185	PackageLocalizedText.cpp
186	PackageScreenshotInfo.cpp
187	PublisherInfo.cpp
188	ScreenshotInfo.cpp
189	UserInfo.cpp
190	UserRating.cpp
191	UserRatingInfo.cpp
192	UserRatingSummary.cpp
193
194	# network + server / local processes
195	AbstractProcess.cpp
196	AbstractProcessNode.cpp
197	AbstractServerProcess.cpp
198	AbstractSingleFileServerProcess.cpp
199	CacheScreenshotProcess.cpp
200	LocalPkgDataLoadProcess.cpp
201	LocalRepositoryUpdateProcess.cpp
202	PopulatePkgChangelogFromServerProcess.cpp
203	PopulatePkgSizesProcess.cpp
204	PopulatePkgUserRatingsFromServerProcess.cpp
205	ProcessCoordinator.cpp
206	ProcessCoordinatorFactory.cpp
207	ServerHelper.cpp
208	ServerSettings.cpp
209	ServerPkgDataUpdateProcess.cpp
210	ServerReferenceDataUpdateProcess.cpp
211	ServerRepositoryDataUpdateProcess.cpp
212	ServerIconExportUpdateProcess.cpp
213	StandardMetaDataJsonEventListener.cpp
214	StandardMetaData.cpp
215	ThreadedProcessNode.cpp
216	UserDetailVerifierProcess.cpp
217	WebAppInterface.cpp
218
219	# tar
220	TarArchiveHeader.cpp
221	TarArchiveService.cpp
222
223	# util
224	AppUtils.cpp
225	DataIOUtils.cpp
226	LanguageMenuUtils.cpp
227	LocaleUtils.cpp
228	PackageKitUtils.cpp
229	PackageUtils.cpp
230	StorageUtils.cpp
231	StringUtils.cpp
232	LoggingUrlProtocolListener.cpp
233
234	# package_daemon
235	ProblemWindow.cpp
236	ResultWindow.cpp
237;
238
239local generatedPkgModelSourceFiles =
240	DumpExportPkg.cpp
241	DumpExportPkgCategory.cpp
242	DumpExportPkgScreenshot.cpp
243	DumpExportPkgVersion.cpp
244;
245
246local generatedRepositoryModelSourceFiles =
247	DumpExportRepository.cpp
248	DumpExportRepositorySource.cpp
249	DumpExportRepositorySourceMirror.cpp
250;
251
252local generatedReferenceModelSourceFiles =
253	DumpExportReference.cpp
254	DumpExportReferenceNaturalLanguage.cpp
255	DumpExportReferencePkgCategory.cpp
256	DumpExportReferenceUserRatingStability.cpp
257	DumpExportReferenceCountry.cpp
258;
259
260local generatedPkgParserSourceFiles =
261	DumpExportPkgJsonListener.cpp
262;
263
264local generatedRepositoryParserSourceFiles =
265	DumpExportRepositoryJsonListener.cpp
266;
267
268local generatedReferenceParserSourceFiles =
269	DumpExportReferenceJsonListener.cpp
270;
271
272Application HaikuDepot
273	:
274	$(applicationSources)
275	$(textDocumentSources)
276	$(generatedPkgModelSourceFiles)
277	$(generatedRepositoryModelSourceFiles)
278	$(generatedReferenceModelSourceFiles)
279	$(generatedPkgParserSourceFiles)
280	$(generatedRepositoryParserSourceFiles)
281	$(generatedReferenceParserSourceFiles)
282	:
283	be package bnetapi translation libnetservices.a libcolumnlistview.a shared
284	[ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub
285	:
286	HaikuDepot.rdef
287;
288
289DoCatalogs HaikuDepot :
290	x-vnd.Haiku-HaikuDepot
291	:
292	$(applicationSources)
293;
294
295# The following use of rules configures the generation of .cpp and .h files from
296# JSON schemas that are defined in the HaikuDepotServer system.  See the
297# included Jam rules and actions for the definitions.
298
299HdsSchemaGenModel $(dumpExportPkgModelTargetFile)
300	: dumpexportpkg.json : jsonschema2cppmodel.py ;
301
302HdsSchemaGenModel $(dumpExportRepositoryModelTargetFile)
303	: dumpexportrepository.json : jsonschema2cppmodel.py ;
304
305HdsSchemaGenModel $(dumpExportReferenceModelTargetFile)
306	: dumpexportreference.json : jsonschema2cppmodel.py ;
307
308HdsSchemaGenBulkParser $(dumpExportRepositoryBulkListerTargetFile)
309	: dumpexportrepository.json : jsonschema2cppparser.py ;
310
311HdsSchemaGenBulkParser $(dumpExportPkgBulkListenerTargetFile)
312	: dumpexportpkg.json : jsonschema2cppparser.py ;
313
314HdsSchemaGenParser $(dumpExportReferenceListenerTargetFile)
315	: dumpexportreference.json : jsonschema2cppparser.py ;
316
317HdsSchemaGenAppSrcDependsOnGeneration
318	[ FGristFiles $(generatedPkgParserSourceFiles) ]
319	[ FGristFiles $(generatedPkgParserSourceFiles:S=.h) ]
320	: $(dumpExportPkgBulkListenerTargetDirectory)
321	: $(dumpExportPkgBulkListenerTargetFile) ;
322
323HdsSchemaGenAppSrcDependsOnGeneration
324	[ FGristFiles $(generatedRepositoryParserSourceFiles) ]
325	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
326	: $(dumpExportRepositoryBulkListerTargetDirectory)
327	: $(dumpExportRepositoryBulkListerTargetFile) ;
328
329HdsSchemaGenAppSrcDependsOnGeneration
330	[ FGristFiles $(generatedReferenceParserSourceFiles) ]
331	[ FGristFiles $(generatedReferenceParserSourceFiles:S=.h) ]
332	: $(dumpExportReferenceListenerTargetDirectory)
333	: $(dumpExportReferenceListenerTargetFile) ;
334
335HdsSchemaGenAppSrcDependsOnGeneration
336	[ FGristFiles $(generatedRepositoryModelSourceFiles) ]
337	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
338	: $(dumpExportRepositoryModelTargetDirectory)
339	: $(dumpExportRepositoryModelTargetFile) ;
340
341HdsSchemaGenAppSrcDependsOnGeneration
342	[ FGristFiles $(generatedPkgModelSourceFiles) ]
343	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
344	: $(dumpExportPkgModelTargetDirectory)
345	: $(dumpExportPkgModelTargetFile) ;
346
347HdsSchemaGenAppSrcDependsOnGeneration
348	[ FGristFiles $(generatedReferenceModelSourceFiles) ]
349	[ FGristFiles $(generatedReferenceModelSourceFiles:S=.h) ]
350	: $(dumpExportReferenceModelTargetDirectory)
351	: $(dumpExportReferenceModelTargetFile) ;
352
353# This will ensure that if any of the generated files' header files change, then
354# the application should be re-built.
355
356Includes [ FGristFiles $(applicationSources) ]
357	:
358	$(dumpExportRepositoryBulkListerTargetDirectory)
359	$(dumpExportPkgBulkListenerTargetDirectory)
360	$(dumpExportReferenceListenerTargetDirectory)
361	$(dumpExportPkgModelTargetDirectory)
362	$(dumpExportRepositoryModelTargetDirectory)
363	$(dumpExportReferenceModelTargetDirectory)
364;
365
366Depends [ FGristFiles $(applicationSources:S=.o) ]
367	:
368	[ FGristFiles $(generatedPkgParserSourceFiles:S=.h) ]
369	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
370	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
371	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
372	[ FGristFiles $(generatedReferenceParserSourceFiles:S=.h) ]
373	[ FGristFiles $(generatedReferenceModelSourceFiles:S=.h) ]
374;
375