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