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