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