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