xref: /haiku/src/apps/haikudepot/Jamfile (revision 410ed2fbba58819ac21e27d3676739728416761d)
1SubDir HAIKU_TOP src apps haikudepot ;
2
3# disable -Werror for this directory only
4SubDirC++Flags -Wno-error ;
5
6include [ FDirName $(HAIKU_TOP) src apps haikudepot build jam
7	HdsSchemaGenRules ] ;
8
9UsePrivateHeaders interface kernel net netservices package shared storage ;
10UsePrivateHeaders support locale ;
11
12HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY = $(TARGET_COMMON_DEBUG_LOCATE_TARGET) ;
13
14# During the build process, some sources are generated into directories.  These
15# are the directories.
16
17local dumpExportRepositoryBulkListerTargetDirectory =
18	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
19		dumpexportrepositorybulklistener ] ;
20local dumpExportPkgBulkListenerTargetDirectory =
21	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
22		dumpexportpkgbulklistener ] ;
23local dumpExportReferenceListenerTargetDirectory =
24	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
25		dumpexportreferencelistener ] ;
26
27local dumpExportPkgModelTargetDirectory =
28	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
29		dumpexportpkgmodel ] ;
30local dumpExportRepositoryModelTargetDirectory =
31	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
32		dumpexportrepositorymodel ] ;
33local dumpExportReferenceModelTargetDirectory =
34	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
35		dumpexportreferencemodel ] ;
36
37# During the build process, some sources are generated into a directory.  In
38# order to maintain a timestamp on that generation process, a dummy file is
39# used to signify the target of the generation.  The leafname of this dummy file
40# is defined here.
41
42local dummyFile = "dummy.dat" ;
43
44local dumpExportRepositoryBulkListerTargetFile =
45	[ FDirName $(dumpExportRepositoryBulkListerTargetDirectory) $(dummyFile) ] ;
46local dumpExportPkgBulkListenerTargetFile =
47	[ FDirName $(dumpExportPkgBulkListenerTargetDirectory) $(dummyFile) ] ;
48local dumpExportReferenceListenerTargetFile =
49	[ FDirName $(dumpExportReferenceListenerTargetDirectory) $(dummyFile) ] ;
50
51local dumpExportPkgModelTargetFile =
52	[ FDirName $(dumpExportPkgModelTargetDirectory) $(dummyFile) ] ;
53local dumpExportRepositoryModelTargetFile =
54	[ FDirName $(dumpExportRepositoryModelTargetDirectory) $(dummyFile) ] ;
55local dumpExportReferenceModelTargetFile =
56	[ FDirName $(dumpExportReferenceModelTargetDirectory) $(dummyFile) ] ;
57
58# source directories
59local sourceDirs =
60	edits_generic
61	model
62	textview
63	ui
64	ui_generic
65	server
66	tar
67	util
68;
69
70local sourceDir ;
71for sourceDir in $(sourceDirs) {
72	SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src apps haikudepot $(sourceDir) ] ;
73}
74
75SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src servers package ] ;
76
77SEARCH_SOURCE += $(dumpExportRepositoryBulkListerTargetDirectory) ;
78SEARCH_SOURCE += $(dumpExportPkgBulkListenerTargetDirectory) ;
79SEARCH_SOURCE += $(dumpExportReferenceListenerTargetDirectory) ;
80
81SEARCH_SOURCE += $(dumpExportPkgModelTargetDirectory) ;
82SEARCH_SOURCE += $(dumpExportRepositoryModelTargetDirectory) ;
83SEARCH_SOURCE += $(dumpExportReferenceModelTargetDirectory) ;
84
85local textDocumentSources =
86	# edits_generic
87	CompoundEdit.cpp
88	EditContext.cpp
89	EditManager.cpp
90	UndoableEdit.cpp
91
92	# textview
93	Bullet.cpp
94	BulletData.cpp
95	CharacterStyle.cpp
96	CharacterStyleData.cpp
97	MarkupParser.cpp
98	Paragraph.cpp
99	ParagraphLayout.cpp
100	ParagraphStyle.cpp
101	ParagraphStyleData.cpp
102	TextDocument.cpp
103	TextDocumentLayout.cpp
104	TextDocumentView.cpp
105	TextEditor.cpp
106	TextListener.cpp
107	TextSelection.cpp
108	TextSpan.cpp
109	TextView.cpp
110	UndoableEditListener.cpp
111;
112
113local applicationSources =
114	App.cpp
115	BarberPole.cpp
116	BitmapView.cpp
117	Captcha.cpp
118	CreateUserDetail.cpp
119	DecisionProvider.cpp
120	FeaturedPackagesView.cpp
121	FilterView.cpp
122	IconTarPtr.cpp
123	IncrementViewCounterProcess.cpp
124	JobStateListener.cpp
125	LanguageModel.cpp
126	LinkView.cpp
127	LinkedBitmapView.cpp
128	Logger.cpp
129	main.cpp
130	MainWindow.cpp
131	MarkupTextView.cpp
132	MessagePackageListener.cpp
133	Model.cpp
134	PackageAction.cpp
135	PackageActionHandler.cpp
136	PackageContentsView.cpp
137	PackageIconTarRepository.cpp
138	PackageInfo.cpp
139	PackageInfoListener.cpp
140	PackageInfoView.cpp
141	PackageListView.cpp
142	PackageManager.cpp
143	RatePackageWindow.cpp
144	RatingView.cpp
145	RatingStability.cpp
146	RatingUtils.cpp
147	support.cpp
148	ScreenshotWindow.cpp
149	ScrollableGroupView.cpp
150	SettingsWindow.cpp
151	SharedBitmap.cpp
152	ToLatestUserUsageConditionsWindow.cpp
153	UserCredentials.cpp
154	UserDetail.cpp
155	UserLoginWindow.cpp
156	UserUsageConditions.cpp
157	UserUsageConditionsWindow.cpp
158	ValidationFailure.cpp
159	ValidationUtils.cpp
160	WorkStatusView.cpp
161
162	# network + server / local processes
163	AbstractProcess.cpp
164	AbstractServerProcess.cpp
165	AbstractSingleFileServerProcess.cpp
166	LocalPkgDataLoadProcess.cpp
167	LocalRepositoryUpdateProcess.cpp
168	ProcessCoordinator.cpp
169	ProcessCoordinatorFactory.cpp
170	ProcessNode.cpp
171	ServerHelper.cpp
172	ServerSettings.cpp
173	ServerPkgDataUpdateProcess.cpp
174	ServerReferenceDataUpdateProcess.cpp
175	ServerRepositoryDataUpdateProcess.cpp
176	ServerIconExportUpdateProcess.cpp
177	StandardMetaDataJsonEventListener.cpp
178	StandardMetaData.cpp
179	UserDetailVerifierProcess.cpp
180	WebAppInterface.cpp
181
182	# tar
183	TarArchiveHeader.cpp
184	TarArchiveService.cpp
185
186	# util
187	AppUtils.cpp
188	DataIOUtils.cpp
189	LanguageMenuUtils.cpp
190	LocaleUtils.cpp
191	RepositoryUrlUtils.cpp
192	StorageUtils.cpp
193	LoggingUrlProtocolListener.cpp
194
195	# package_daemon
196	ProblemWindow.cpp
197	ResultWindow.cpp
198;
199
200local generatedPkgModelSourceFiles =
201	DumpExportPkg.cpp
202	DumpExportPkgCategory.cpp
203	DumpExportPkgScreenshot.cpp
204	DumpExportPkgVersion.cpp
205;
206
207local generatedRepositoryModelSourceFiles =
208	DumpExportRepository.cpp
209	DumpExportRepositorySource.cpp
210	DumpExportRepositorySourceMirror.cpp
211;
212
213local generatedReferenceModelSourceFiles =
214	DumpExportReference.cpp
215	DumpExportReferenceNaturalLanguage.cpp
216	DumpExportReferencePkgCategory.cpp
217	DumpExportReferenceUserRatingStability.cpp
218	DumpExportReferenceCountry.cpp
219;
220
221local generatedPkgParserSourceFiles =
222	DumpExportPkgJsonListener.cpp
223;
224
225local generatedRepositoryParserSourceFiles =
226	DumpExportRepositoryJsonListener.cpp
227;
228
229local generatedReferenceParserSourceFiles =
230	DumpExportReferenceJsonListener.cpp
231;
232
233Application HaikuDepot
234	:
235	$(applicationSources)
236	$(textDocumentSources)
237	$(generatedPkgModelSourceFiles)
238	$(generatedRepositoryModelSourceFiles)
239	$(generatedReferenceModelSourceFiles)
240	$(generatedPkgParserSourceFiles)
241	$(generatedRepositoryParserSourceFiles)
242	$(generatedReferenceParserSourceFiles)
243	:
244	be package bnetapi translation libnetservices.a libcolumnlistview.a shared
245	[ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub
246	:
247	HaikuDepot.rdef
248;
249
250DoCatalogs HaikuDepot :
251	x-vnd.Haiku-HaikuDepot
252	:
253	App.cpp
254	FeaturedPackagesView.cpp
255	FilterView.cpp
256	LocaleUtils.cpp
257	LocalPkgDataLoadProcess.cpp
258	LocalRepositoryUpdateProcess.cpp
259	MainWindow.cpp
260	Model.cpp
261	PackageContentsView.cpp
262	PackageInfoView.cpp
263	PackageListView.cpp
264	PackageManager.cpp
265	ProcessCoordinator.cpp
266	RatePackageWindow.cpp
267	ScreenshotWindow.cpp
268	ServerHelper.cpp
269	ServerIconExportUpdateProcess.cpp
270	ServerPkgDataUpdateProcess.cpp
271	ServerReferenceDataUpdateProcess.cpp
272	ServerRepositoryDataUpdateProcess.cpp
273	SettingsWindow.cpp
274	UserLoginWindow.cpp
275	WorkStatusView.cpp
276;
277
278# The following use of rules configures the generation of .cpp and .h files from
279# JSON schemas that are defined in the HaikuDepotServer system.  See the
280# included Jam rules and actions for the definitions.
281
282HdsSchemaGenModel $(dumpExportPkgModelTargetFile)
283	: dumpexportpkg.json : jsonschema2cppmodel.py ;
284
285HdsSchemaGenModel $(dumpExportRepositoryModelTargetFile)
286	: dumpexportrepository.json : jsonschema2cppmodel.py ;
287
288HdsSchemaGenModel $(dumpExportReferenceModelTargetFile)
289	: dumpexportreference.json : jsonschema2cppmodel.py ;
290
291HdsSchemaGenBulkParser $(dumpExportRepositoryBulkListerTargetFile)
292	: dumpexportrepository.json : jsonschema2cppparser.py ;
293
294HdsSchemaGenBulkParser $(dumpExportPkgBulkListenerTargetFile)
295	: dumpexportpkg.json : jsonschema2cppparser.py ;
296
297HdsSchemaGenParser $(dumpExportReferenceListenerTargetFile)
298	: dumpexportreference.json : jsonschema2cppparser.py ;
299
300HdsSchemaGenAppSrcDependsOnGeneration
301	[ FGristFiles $(generatedPkgParserSourceFiles) ]
302	[ FGristFiles $(generatedPkgParserSourceFiles:S=.h) ]
303	: $(dumpExportPkgBulkListenerTargetFile) ;
304
305HdsSchemaGenAppSrcDependsOnGeneration
306	[ FGristFiles $(generatedRepositoryParserSourceFiles) ]
307	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
308	: $(dumpExportRepositoryBulkListerTargetFile) ;
309
310HdsSchemaGenAppSrcDependsOnGeneration
311	[ FGristFiles $(generatedReferenceParserSourceFiles) ]
312	[ FGristFiles $(generatedReferenceParserSourceFiles:S=.h) ]
313	: $(dumpExportReferenceListenerTargetFile) ;
314
315HdsSchemaGenAppSrcDependsOnGeneration
316	[ FGristFiles $(generatedRepositoryModelSourceFiles) ]
317	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
318	: $(dumpExportRepositoryModelTargetFile) ;
319
320HdsSchemaGenAppSrcDependsOnGeneration
321	[ FGristFiles $(generatedPkgModelSourceFiles) ]
322	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
323	: $(dumpExportPkgModelTargetFile) ;
324
325HdsSchemaGenAppSrcDependsOnGeneration
326	[ FGristFiles $(generatedReferenceModelSourceFiles) ]
327	[ FGristFiles $(generatedReferenceModelSourceFiles:S=.h) ]
328	: $(dumpExportReferenceModelTargetFile) ;
329
330# This will ensure that if any of the generated files' header files change, then
331# the application should be re-built.
332
333Depends [ FGristFiles $(applicationSources:S=.o) ]
334	:
335	[ FGristFiles $(generatedPkgParserSourceFiles:S=.h) ]
336	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
337	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
338	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
339	[ FGristFiles $(generatedReferenceParserSourceFiles:S=.h) ]
340	[ FGristFiles $(generatedReferenceModelSourceFiles:S=.h) ]
341;
342