xref: /haiku/src/apps/haikudepot/Jamfile (revision 5ac9b506412b11afb993bb52d161efe7666958a5)
1SubDir HAIKU_TOP src apps haikudepot ;
2
3include [ FDirName $(HAIKU_TOP) src apps haikudepot build jam
4	HdsSchemaGenRules ] ;
5
6UsePrivateHeaders interface kernel net package shared storage support ;
7
8HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY = $(TARGET_COMMON_DEBUG_LOCATE_TARGET) ;
9
10# During the build process, some sources are generated into directories.  These
11# are the directories.
12
13local dumpExportRepositoryBulkListerTargetDirectory =
14	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
15		dumpexportrepositorybulklistener ] ;
16local dumpExportPkgBulkListenerTargetDirectory =
17	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
18		dumpexportpkgbulklistener ] ;
19local dumpExportPkgModelTargetDirectory =
20	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
21		dumpexportpkgmodel ] ;
22local dumpExportRepositoryModelTargetDirectory =
23	[ FDirName $(HAIKUDEPOT_GENERATED_SOURCES_DIRECTORY)
24		dumpexportrepositorymodel ] ;
25
26# During the build process, some sources are generated into a directory.  In
27# order to maintain a timestamp on that generation process, a dummy file is
28# used to signify the target of the generation.  The leafname of this dummy file
29# is defined here.
30
31local dummyFile = "dummy.dat" ;
32
33local dumpExportRepositoryBulkListerTargetFile =
34	[ FDirName $(dumpExportRepositoryBulkListerTargetDirectory) $(dummyFile) ] ;
35local dumpExportPkgBulkListenerTargetFile =
36	[ FDirName $(dumpExportPkgBulkListenerTargetDirectory) $(dummyFile) ] ;
37local dumpExportPkgModelTargetFile =
38	[ FDirName $(dumpExportPkgModelTargetDirectory) $(dummyFile) ] ;
39local dumpExportRepositoryModelTargetFile =
40	[ FDirName $(dumpExportRepositoryModelTargetDirectory) $(dummyFile) ] ;
41
42# source directories
43local sourceDirs =
44	edits_generic
45	model
46	textview
47	ui
48	ui_generic
49	server
50	tar
51	util
52;
53
54local sourceDir ;
55for sourceDir in $(sourceDirs) {
56	SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src apps haikudepot $(sourceDir) ] ;
57}
58
59SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src servers package ] ;
60SEARCH_SOURCE += $(dumpExportRepositoryBulkListerTargetDirectory) ;
61SEARCH_SOURCE += $(dumpExportPkgBulkListenerTargetDirectory) ;
62SEARCH_SOURCE += $(dumpExportPkgModelTargetDirectory) ;
63SEARCH_SOURCE += $(dumpExportRepositoryModelTargetDirectory) ;
64
65local textDocumentSources =
66	# edits_generic
67	CompoundEdit.cpp
68	EditContext.cpp
69	EditManager.cpp
70	EditStack.cpp
71	UndoableEdit.cpp
72
73	# textview
74	Bullet.cpp
75	BulletData.cpp
76	CharacterStyle.cpp
77	CharacterStyleData.cpp
78	MarkupParser.cpp
79	Paragraph.cpp
80	ParagraphLayout.cpp
81	ParagraphStyle.cpp
82	ParagraphStyleData.cpp
83	TextDocument.cpp
84	TextDocumentLayout.cpp
85	TextDocumentView.cpp
86	TextEditor.cpp
87	TextListener.cpp
88	TextSelection.cpp
89	TextSpan.cpp
90	TextView.cpp
91	UndoableEditListener.cpp
92;
93
94local applicationSources =
95	App.cpp
96	BarberPole.cpp
97	BitmapButton.cpp
98	BitmapView.cpp
99	DecisionProvider.cpp
100	FeaturedPackagesView.cpp
101	FilterView.cpp
102	LocalIconStore.cpp
103	JobStateListener.cpp
104	LinkView.cpp
105	LinkedBitmapView.cpp
106	Logger.cpp
107	main.cpp
108	MainWindow.cpp
109	MarkupTextView.cpp
110	MessagePackageListener.cpp
111	Model.cpp
112	PackageAction.cpp
113	PackageActionHandler.cpp
114	PackageContentsView.cpp
115	PackageInfo.cpp
116	PackageInfoListener.cpp
117	PackageInfoView.cpp
118	PackageListView.cpp
119	PackageManager.cpp
120	RatePackageWindow.cpp
121	RatingView.cpp
122	support.cpp
123	ScreenshotWindow.cpp
124	ScrollableGroupView.cpp
125	SharedBitmap.cpp
126	UserLoginWindow.cpp
127	WorkStatusView.cpp
128
129	# network + server / local processes
130	AbstractProcess.cpp
131	AbstractServerProcess.cpp
132	AbstractSingleFileServerProcess.cpp
133	LocalPkgDataLoadProcess.cpp
134	LocalRepositoryUpdateProcess.cpp
135	ProcessCoordinator.cpp
136	ProcessCoordinatorFactory.cpp
137	ProcessNode.cpp
138	ServerHelper.cpp
139	ServerSettings.cpp
140	ServerPkgDataUpdateProcess.cpp
141	ServerRepositoryDataUpdateProcess.cpp
142	ServerIconExportUpdateProcess.cpp
143	StandardMetaDataJsonEventListener.cpp
144	StandardMetaData.cpp
145	WebAppInterface.cpp
146
147	# tar
148	TarArchiveHeader.cpp
149	TarArchiveService.cpp
150
151	# util
152	AppUtils.cpp
153	DataIOUtils.cpp
154	RepositoryUrlUtils.cpp
155	StorageUtils.cpp
156	ToFileUrlProtocolListener.cpp
157
158	# package_daemon
159	ProblemWindow.cpp
160	ResultWindow.cpp
161;
162
163local generatedPkgModelSourceFiles =
164	DumpExportPkg.cpp
165	DumpExportPkgCategory.cpp
166	DumpExportPkgScreenshot.cpp
167	DumpExportPkgVersion.cpp
168;
169
170local generatedRepositoryModelSourceFiles =
171	DumpExportRepository.cpp
172	DumpExportRepositorySource.cpp
173	DumpExportRepositorySourceMirror.cpp
174;
175
176local generatedPkgParserSourceFiles =
177	DumpExportPkgJsonListener.cpp
178;
179
180local generatedRepositoryParserSourceFiles =
181	DumpExportRepositoryJsonListener.cpp
182;
183
184Application HaikuDepot
185	: $(applicationSources) $(textDocumentSources)
186		$(generatedPkgModelSourceFiles) $(generatedRepositoryModelSourceFiles)
187		$(generatedPkgParserSourceFiles) $(generatedRepositoryParserSourceFiles)
188	: be package bnetapi translation libcolumnlistview.a shared
189		[ TargetLibstdc++ ] [ TargetLibsupc++ ] localestub
190	: HaikuDepot.rdef
191;
192
193DoCatalogs HaikuDepot :
194	x-vnd.Haiku-HaikuDepot
195	:
196	App.cpp
197	FeaturedPackagesView.cpp
198	FilterView.cpp
199	MainWindow.cpp
200	Model.cpp
201	PackageContentsView.cpp
202	PackageInfoView.cpp
203	PackageListView.cpp
204	PackageManager.cpp
205	RatePackageWindow.cpp
206	ScreenshotWindow.cpp
207	UserLoginWindow.cpp
208	WorkStatusView.cpp
209;
210
211Application TextDocumentTest :
212	TextDocumentTest.cpp
213	$(textDocumentSources)
214
215	: be translation shared [ TargetLibsupc++ ]
216;
217
218# The following use of rules configures the generation of .cpp and .h files from
219# JSON schemas that are defined in the HaikuDepotServer system.  See the
220# included Jam rules and actions for the definitions.
221
222HdsSchemaGenModel $(dumpExportPkgModelTargetFile)
223	: dumpexportpkg.json : jsonschema2cppmodel.py ;
224
225HdsSchemaGenModel $(dumpExportRepositoryModelTargetFile)
226	: dumpexportrepository.json : jsonschema2cppmodel.py ;
227
228HdsSchemaGenBulkParser $(dumpExportRepositoryBulkListerTargetFile)
229	: dumpexportrepository.json : jsonschema2cppparser.py ;
230
231HdsSchemaGenBulkParser $(dumpExportPkgBulkListenerTargetFile)
232	: dumpexportpkg.json : jsonschema2cppparser.py ;
233
234HdsSchemaGenAppSrcDependsOnGeneration
235	[ FGristFiles $(generatedPkgParserSourceFiles) ]
236	[ FGristFiles $(generatedPkgParserSourceFiles:S=.h) ]
237	: $(dumpExportPkgBulkListenerTargetFile) ;
238
239HdsSchemaGenAppSrcDependsOnGeneration
240	[ FGristFiles $(generatedRepositoryParserSourceFiles) ]
241	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
242	: $(dumpExportRepositoryBulkListerTargetFile) ;
243
244HdsSchemaGenAppSrcDependsOnGeneration
245	[ FGristFiles $(generatedRepositoryModelSourceFiles) ]
246	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
247	: $(dumpExportRepositoryModelTargetFile) ;
248
249HdsSchemaGenAppSrcDependsOnGeneration
250	[ FGristFiles $(generatedPkgModelSourceFiles) ]
251	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
252	: $(dumpExportPkgModelTargetFile) ;
253
254# This will ensure that if any of the generated files' header files change, then
255# the application should be re-built.
256
257Depends [ FGristFiles $(applicationSources:S=.o) ]
258	:
259	[ FGristFiles $(generatedPkgParserSourceFiles:S=.h) ]
260	[ FGristFiles $(generatedRepositoryParserSourceFiles:S=.h) ]
261	[ FGristFiles $(generatedRepositoryModelSourceFiles:S=.h) ]
262	[ FGristFiles $(generatedPkgModelSourceFiles:S=.h) ]
263;