xref: /haiku/src/apps/haikudepot/Jamfile (revision 1978089f7cec856677e46204e992c7273d70b9af)
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	BitmapView.cpp
119	Captcha.cpp
120	CreateUserDetail.cpp
121	DecisionProvider.cpp
122	DeskbarLink.cpp
123	FeaturedPackagesView.cpp
124	FilterView.cpp
125	GeneralContentScrollView.cpp
126	IconTarPtr.cpp
127	IncrementViewCounterProcess.cpp
128	JobStateListener.cpp
129	JwtTokenHelper.cpp
130	LanguageModel.cpp
131	LinkView.cpp
132	LinkedBitmapView.cpp
133	Logger.cpp
134	main.cpp
135	MainWindow.cpp
136	MarkupTextView.cpp
137	MessagePackageListener.cpp
138	Model.cpp
139	PackageContentsView.cpp
140	PackageIconTarRepository.cpp
141	PackageInfoListener.cpp
142	PackageInfoView.cpp
143	PackageListView.cpp
144	PackageScreenshotRepository.cpp
145	PasswordRequirements.cpp
146	RatePackageWindow.cpp
147	RatingView.cpp
148	RatingStability.cpp
149	RatingUtils.cpp
150	support.cpp
151	ScreenshotWindow.cpp
152	ScreenshotCoordinate.cpp
153	ScrollableGroupView.cpp
154	SettingsWindow.cpp
155	SharedBitmap.cpp
156	ShuttingDownWindow.cpp
157	ToLatestUserUsageConditionsWindow.cpp
158	UserCredentials.cpp
159	UserDetail.cpp
160	UserLoginWindow.cpp
161	UserUsageConditions.cpp
162	UserUsageConditionsWindow.cpp
163	ValidationFailure.cpp
164	ValidationUtils.cpp
165	WorkStatusView.cpp
166
167	# packagemanagement
168	AbstractPackageProcess.cpp
169	InstallPackageProcess.cpp
170	OpenPackageProcess.cpp
171	PackageAction.cpp
172	PackageManager.cpp
173	UninstallPackageProcess.cpp
174
175	#packagemodel
176	DepotInfo.cpp
177	Language.cpp
178	PackageCategory.cpp
179	PackageInfo.cpp
180	PublisherInfo.cpp
181	RatingSummary.cpp
182	ScreenshotInfo.cpp
183	UserInfo.cpp
184	UserRating.cpp
185
186	# network + server / local processes
187	AbstractProcess.cpp
188	AbstractProcessNode.cpp
189	AbstractServerProcess.cpp
190	AbstractSingleFileServerProcess.cpp
191	CacheScreenshotProcess.cpp
192	LocalPkgDataLoadProcess.cpp
193	LocalRepositoryUpdateProcess.cpp
194	PopulatePkgSizesProcess.cpp
195	ProcessCoordinator.cpp
196	ProcessCoordinatorFactory.cpp
197	ServerHelper.cpp
198	ServerSettings.cpp
199	ServerPkgDataUpdateProcess.cpp
200	ServerReferenceDataUpdateProcess.cpp
201	ServerRepositoryDataUpdateProcess.cpp
202	ServerIconExportUpdateProcess.cpp
203	StandardMetaDataJsonEventListener.cpp
204	StandardMetaData.cpp
205	ThreadedProcessNode.cpp
206	UserDetailVerifierProcess.cpp
207	WebAppInterface.cpp
208
209	# tar
210	TarArchiveHeader.cpp
211	TarArchiveService.cpp
212
213	# util
214	AppUtils.cpp
215	DataIOUtils.cpp
216	LanguageMenuUtils.cpp
217	LocaleUtils.cpp
218	PackageUtils.cpp
219	StorageUtils.cpp
220	StringUtils.cpp
221	LoggingUrlProtocolListener.cpp
222
223	# package_daemon
224	ProblemWindow.cpp
225	ResultWindow.cpp
226;
227
228local generatedPkgModelSourceFiles =
229	DumpExportPkg.cpp
230	DumpExportPkgCategory.cpp
231	DumpExportPkgScreenshot.cpp
232	DumpExportPkgVersion.cpp
233;
234
235local generatedRepositoryModelSourceFiles =
236	DumpExportRepository.cpp
237	DumpExportRepositorySource.cpp
238	DumpExportRepositorySourceMirror.cpp
239;
240
241local generatedReferenceModelSourceFiles =
242	DumpExportReference.cpp
243	DumpExportReferenceNaturalLanguage.cpp
244	DumpExportReferencePkgCategory.cpp
245	DumpExportReferenceUserRatingStability.cpp
246	DumpExportReferenceCountry.cpp
247;
248
249local generatedPkgParserSourceFiles =
250	DumpExportPkgJsonListener.cpp
251;
252
253local generatedRepositoryParserSourceFiles =
254	DumpExportRepositoryJsonListener.cpp
255;
256
257local generatedReferenceParserSourceFiles =
258	DumpExportReferenceJsonListener.cpp
259;
260
261Application HaikuDepot
262	:
263	$(applicationSources)
264	$(textDocumentSources)
265	$(generatedPkgModelSourceFiles)
266	$(generatedRepositoryModelSourceFiles)
267	$(generatedReferenceModelSourceFiles)
268	$(generatedPkgParserSourceFiles)
269	$(generatedRepositoryParserSourceFiles)
270	$(generatedReferenceParserSourceFiles)
271	:
272	be package bnetapi translation libnetservices.a libcolumnlistview.a shared
273	[ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub
274	:
275	HaikuDepot.rdef
276;
277
278DoCatalogs HaikuDepot :
279	x-vnd.Haiku-HaikuDepot
280	:
281	$(applicationSources)
282;
283
284# The following use of rules configures the generation of .cpp and .h files from
285# JSON schemas that are defined in the HaikuDepotServer system.  See the
286# included Jam rules and actions for the definitions.
287
288HdsSchemaGenModel $(dumpExportPkgModelTargetFile)
289	: dumpexportpkg.json : jsonschema2cppmodel.py ;
290
291HdsSchemaGenModel $(dumpExportRepositoryModelTargetFile)
292	: dumpexportrepository.json : jsonschema2cppmodel.py ;
293
294HdsSchemaGenModel $(dumpExportReferenceModelTargetFile)
295	: dumpexportreference.json : jsonschema2cppmodel.py ;
296
297HdsSchemaGenBulkParser $(dumpExportRepositoryBulkListerTargetFile)
298	: dumpexportrepository.json : jsonschema2cppparser.py ;
299
300HdsSchemaGenBulkParser $(dumpExportPkgBulkListenerTargetFile)
301	: dumpexportpkg.json : jsonschema2cppparser.py ;
302
303HdsSchemaGenParser $(dumpExportReferenceListenerTargetFile)
304	: dumpexportreference.json : jsonschema2cppparser.py ;
305
306HdsSchemaGenAppSrcDependsOnGeneration
307	[ FGristFiles $(generatedPkgParserSourceFiles) ]
308	[ FGristFiles $(generatedPkgParserSourceFiles:S=.h) ]
309	: $(dumpExportPkgBulkListenerTargetDirectory)
310	: $(dumpExportPkgBulkListenerTargetFile) ;
311
312HdsSchemaGenAppSrcDependsOnGeneration
313	[ FGristFiles $(generatedRepositoryParserSourceFiles) ]
314	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
315	: $(dumpExportRepositoryBulkListerTargetDirectory)
316	: $(dumpExportRepositoryBulkListerTargetFile) ;
317
318HdsSchemaGenAppSrcDependsOnGeneration
319	[ FGristFiles $(generatedReferenceParserSourceFiles) ]
320	[ FGristFiles $(generatedReferenceParserSourceFiles:S=.h) ]
321	: $(dumpExportReferenceListenerTargetDirectory)
322	: $(dumpExportReferenceListenerTargetFile) ;
323
324HdsSchemaGenAppSrcDependsOnGeneration
325	[ FGristFiles $(generatedRepositoryModelSourceFiles) ]
326	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
327	: $(dumpExportRepositoryModelTargetDirectory)
328	: $(dumpExportRepositoryModelTargetFile) ;
329
330HdsSchemaGenAppSrcDependsOnGeneration
331	[ FGristFiles $(generatedPkgModelSourceFiles) ]
332	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
333	: $(dumpExportPkgModelTargetDirectory)
334	: $(dumpExportPkgModelTargetFile) ;
335
336HdsSchemaGenAppSrcDependsOnGeneration
337	[ FGristFiles $(generatedReferenceModelSourceFiles) ]
338	[ FGristFiles $(generatedReferenceModelSourceFiles:S=.h) ]
339	: $(dumpExportReferenceModelTargetDirectory)
340	: $(dumpExportReferenceModelTargetFile) ;
341
342# This will ensure that if any of the generated files' header files change, then
343# the application should be re-built.
344
345Includes [ FGristFiles $(applicationSources) ]
346	:
347	$(dumpExportRepositoryBulkListerTargetDirectory)
348	$(dumpExportPkgBulkListenerTargetDirectory)
349	$(dumpExportReferenceListenerTargetDirectory)
350	$(dumpExportPkgModelTargetDirectory)
351	$(dumpExportRepositoryModelTargetDirectory)
352	$(dumpExportReferenceModelTargetDirectory)
353;
354
355Depends [ FGristFiles $(applicationSources:S=.o) ]
356	:
357	[ FGristFiles $(generatedPkgParserSourceFiles:S=.h) ]
358	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
359	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
360	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
361	[ FGristFiles $(generatedReferenceParserSourceFiles:S=.h) ]
362	[ FGristFiles $(generatedReferenceModelSourceFiles:S=.h) ]
363;
364