Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DISCOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
INAF
DISCOS
Commits
909a7a4b
Commit
909a7a4b
authored
4 months ago
by
Giuseppe Carboni
Browse files
Options
Downloads
Patches
Plain Diff
Fix #928, enabled parallel build with -j
parent
28d9cbdc
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
SystemMake/Makefile
+48
-109
48 additions, 109 deletions
SystemMake/Makefile
with
48 additions
and
109 deletions
SystemMake/Makefile
+
48
−
109
View file @
909a7a4b
...
...
@@ -13,6 +13,7 @@
# Bartolini 02/02/15 added .PHONY target tall
# Bartolini 03/02/15 split away common, inspired by http://lackof.org/taggart/hacking/make-example/
# Bartolini 25/08/15 Added comments and changed default target for all
# Carboni 14/04/25 Enabled correct handling of parallel jobs (-j flag)
#
# this new Makefile section separates code modules between what is common
...
...
@@ -21,40 +22,23 @@
#
COMMON_DOC
:=
COMMON_ERRORS
:=
ClientErrors ComponentErrors AntennaErrors ParserErrors
\
BackendsErrors ManagementErrors ReceiversErrors
\
MetrologyErrors MinorServoErrors XBackendErrors
\
ActiveSurfaceErrors
COMMON_INTERFACES
:=
CommonInterface ManagmentInterface AntennaInterface ReceiversInterface
\
BackendsInterface MinorServoInterface
\
WeatherStationInterface ActiveSurfaceInterface
\
XBackendInterface
COMMON_LIBRARIES
:=
SlaLibrary IRALibrary DiscosVersion TextWindowLibrary ParserLibrary
\
XarcosLibrary ModbusChannel ComponentProxy DiscosLocals XEphemAstroLib
\
DiscosBackendProtocol PyTestingLibrary
\
COMMON_SERVERS:
=
AntennaBoss Observatory OTF PointingModel Refraction SkySource SolarSystem
\
Moon FitsWriter Scheduler ReceiversBoss ExternalClients
\
CalibrationTool TotalPower CustomLogger
\
PyDewarPositioner Sardara Skarab PyLocalOscillator MFKBandBaseReceiver PyCalmux
\
ActiveSurfaceLan ActiveSurfaceUSD XBackend
COMMON_CLIENTS
:=
AntennaBossTextClient ObservatoryTextClient
\
GenericBackendTextClient ReceiversBossTextClient
\
SystemTerminal CaltoolClient CustomLoggingClient
\
SchedulerTextClient MeteoClient
COMMON_ERRORS
:=
ClientErrors ComponentErrors AntennaErrors ParserErrors BackendsErrors ManagementErrors ReceiversErrors MetrologyErrors MinorServoErrors XBackendErrors ActiveSurfaceErrors
COMMON_INTERFACES
:=
CommonInterface ManagmentInterface AntennaInterface ReceiversInterface BackendsInterface MinorServoInterface WeatherStationInterface ActiveSurfaceInterface XBackendInterface
COMMON_LIBRARIES
:=
SlaLibrary IRALibrary DiscosVersion TextWindowLibrary ParserLibrary XarcosLibrary ModbusChannel ComponentProxy DiscosLocals XEphemAstroLib DiscosBackendProtocol PyTestingLibrary
COMMON_SERVERS
:=
AntennaBoss Observatory OTF PointingModel Refraction SkySource SolarSystem Moon FitsWriter Scheduler ReceiversBoss ExternalClients CalibrationTool TotalPower CustomLogger
\
PyDewarPositioner Sardara Skarab PyLocalOscillator MFKBandBaseReceiver PyCalmux ActiveSurfaceLan ActiveSurfaceUSD XBackend
COMMON_CLIENTS
:=
AntennaBossTextClient ObservatoryTextClient GenericBackendTextClient ReceiversBossTextClient SystemTerminal CaltoolClient CustomLoggingClient SchedulerTextClient MeteoClient
COMMON_MISC
:=
Plotter KStars Scripts getTemplateForTests PMUpdate InjectCommand UserTools
COMMON_SIMULATORS
:=
TCPGenericProtocolSim ReceiverBoardSim
COMMON_MODULES
:=
$(
COMMON_ERRORS
)
$(
COMMON_INTERFACES
)
$(
COMMON_LIBRARIES
)
$(
COMMON_SERVERS
)
$(
COMMON_CLIENTS
)
$(
COMMON_MISC
)
$(
COMMON_SIMULATORS
)
SRT_DOC
:=
SRTDox
SRT_ERRORS
:=
SRT_INTERFACES
:=
SRTAntennaInterface SRTActiveSurfaceInterface
\
SRTMinorServoInterface SRTReceiversInterface
SRT_INTERFACES
:=
SRTAntennaInterface SRTActiveSurfaceInterface SRTMinorServoInterface SRTReceiversInterface
SRT_LIBRARIES
:=
SRTMinorServoLibrary
SRT_SERVERS
:=
SRTMount SRTActiveSurfaceBoss SRTMinorServo SRTKBandMFReceiver
\
SRT7GHzReceiver SRT5GHzReceiver SRTLPBandReceiver SRTPyIFDistributor WeatherStation
SRT_CLIENTS
:=
SRTActiveSurfaceGUIClient SRTMountTextClient
\
MinorServoBossTextClient
SRT_SERVERS
:=
SRTMount SRTActiveSurfaceBoss SRTMinorServo SRTKBandMFReceiver SRT7GHzReceiver SRT5GHzReceiver SRTLPBandReceiver SRTPyIFDistributor WeatherStation
SRT_CLIENTS
:=
SRTActiveSurfaceGUIClient SRTMountTextClient MinorServoBossTextClient
SRT_MISC
:=
SRTScripts
MED_DOC
:=
MEDDox
...
...
@@ -66,8 +50,8 @@ MED_CLIENTS:=MedicinaMountTextClient MedicinaActiveSurfaceGUIClient
MED_MISC
:=
MedScripts
NT_DOC
:=
NTDox
NT_ERRORS
:=
#ActiveSurfaceErrors NotoActiveSurfaceErrors
NT_INTERFACES
:=
NotoAntennaInterface NotoReceiversInterface NotoWeatherStationInterface NotoActiveSurfaceInterface
\
NT_ERRORS
:=
NT_INTERFACES
:=
NotoAntennaInterface NotoReceiversInterface NotoWeatherStationInterface NotoActiveSurfaceInterface
NT_LIBRARIES
:=
NT_SERVERS
:=
NotoReceivers NotoMount NotoWeatherStation NotoActiveSurfaceBoss NotoMinorServo NotoPyLocalOscillator NotoPyIfDistributor
NT_CLIENTS
:=
NotoMountTextClient NotoActiveSurfaceGUIClient
...
...
@@ -110,8 +94,9 @@ ifeq ($(STATION),SRT)
CDB_SVN_LOCATION
=
"SRT/Configuration/CDB"
SYSTEM_SVN_MODULES
=
Common SRT
else
ifeq
($(STATION),Medicina)
TELESCOPE_MODULES
:=
$(
SRT_ERRORS
)
$(
SRT_INTERFACES
)
$(
SRT_LIBRARIES
)
$(
SRT_SERVERS
)
$(
SRT_CLIENTS
)
$(
SRT_MISC
)
else
ifeq
($(STATION),Medicina)
#Add all modules included in the Medicina system in this sequence
#Doc, (Errors, Interfacies, Libraries, Servers, Clients, Misc)
MODULES
:=
MEDDox
\
...
...
@@ -144,8 +129,9 @@ ifeq ($(STATION),Medicina)
CDB_SVN_LOCATION
=
"Medicina/Configuration/CDB"
SYSTEM_SVN_MODULES
=
Common Medicina
else
ifeq
($(STATION),Noto)
TELESCOPE_MODULES
:=
$(
MED_ERRORS
)
$(
MED_INTERFACES
)
$(
MED_LIBRARIES
)
$(
MED_SERVERS
)
$(
MED_CLIENTS
)
$(
MED_MISC
)
else
ifeq
($(STATION),Noto)
#Add all modules included in the Noto system in this sequence
#Doc, (Errors, Interfacies, Libraries, Servers, Clients, Misc)
MODULES
:=
ActiveSurfaceErrors ClientErrors ComponentErrors AntennaErrors ParserErrors BackendsErrors ManagementErrors ReceiversErrors MetrologyErrors MinorServoErrors
\
...
...
@@ -174,57 +160,13 @@ ifeq ($(STATION),Noto)
CDB_SVN_LOCATION
=
"Noto/Configuration/CDB"
SYSTEM_SVN_MODULES
=
Common Medicina Noto
TELESCOPE_MODULES
:=
$(
NT_ERRORS
)
$(
NT_INTERFACES
)
$(
NT_LIBRARIES
)
$(
NT_SERVERS
)
$(
NT_CLIENTS
)
$(
NT_MISC
)
else
RESULT
:=
$(
error STATION variable is not
set
correctly!
)
endif
endif
endif
# ******* END of Editable area *****************
COMMON_MODULES
:=
$(
COMMON_ERRORS
)
\
$(
COMMON_INTERFACES
)
\
$(
COMMON_LIBRARIES
)
\
$(
COMMON_SERVERS
)
\
$(
COMMON_CLIENTS
)
\
$(
COMMON_MISC
)
\
$(
COMMON_SIMULATORS
)
SRT_MODULES
:=
$(
SRT_ERRORS
)
\
$(
SRT_INTERFACES
)
\
$(
SRT_LIBRARIES
)
\
$(
SRT_SERVERS
)
\
$(
SRT_CLIENTS
)
\
$(
SRT_MISC
)
MED_MODULES
:=
$(
MED_ERRORS
)
\
$(
MED_INTERFACES
)
\
$(
MED_LIBRARIES
)
\
$(
MED_SERVERS
)
\
$(
MED_CLIENTS
)
\
$(
MED_MISC
)
NT_MODULES
:=
$(
NT_ERRORS
)
\
$(
NT_INTERFACES
)
\
$(
NT_LIBRARIES
)
\
$(
NT_SERVERS
)
\
$(
NT_CLIENTS
)
\
$(
NT_MISC
)
ifeq
($(STATION), SRT)
TELESCOPE_MODULES
:=
$(
SRT_MODULES
)
else
ifeq
($(STATION), Medicina)
TELESCOPE_MODULES
:=
$(
MED_MODULES
)
else
ifeq
($(STATION), Noto)
TELESCOPE_MODULES
:=
$(
NT_MODULES
)
else
RESULT
:=
$(
error STATION variable is not
set
correctly!
)
endif
endif
endif
CURRENT_DIR
:=
$(
shell
pwd
)
/..
define
PathFinder
...
...
@@ -264,7 +206,6 @@ $(foreach i, $(CPP_DOC), $(shell echo "INPUT=$($(i)_MODULES_PATH)" > /tmp/$(i)_c
$(
foreach
i,
$(
IDL_DOC
)
,
$(
shell
echo
"INPUT=
$($(
i
)
_MODULES_PATH
)
"
>
/tmp/
$(
i
)
_idl.in
))
COMPILE_MODULES_PATH
:=
$(
call PathFinder,
$(
MODULES
))
BUILD_DIRS
:=
$(
foreach i,
$(
COMPILE_MODULES_PATH
)
,
$(
i
)
/src
)
COMMON_MODULES_PATH
:=
$(
call PathFinder,
$(
COMMON_MODULES
))
...
...
@@ -287,52 +228,45 @@ DOCIDL:=$(DOC)/idl
DOCCPP
:=
$(
DOC
)
/cpp
.PHONY
:
all
all
:
common-build telescope-build
.PHONY
:
clean
clean
:
common-clean telescope-clean
legacy-all
:
@
for
i
in
$(
BUILD_DIRS
);
do
\
make
-C
$${
i
}
all
install
;
\
done
.PHONY
:
common-build $(COMMON_BUILD_TARGETS)
common-build
:
$(COMMON_BUILD_TARGETS)
$(COMMON_BUILD_TARGETS)
:
$(
MAKE
)
-C
$(
@:build-%
=
%
)
all
install
common-build
:
@
for
i
in
$(
COMMON_MODULES_DIRS
);
do
\
$(
MAKE
)
-C
$${
i
}
all
;
\
$(
MAKE
)
-C
$${
i
}
install
;
\
done
.PHONY
:
common-clean $(COMMON_CLEAN_TARGETS)
common-clean
:
$(COMMON_CLEAN_TARGETS)
$(COMMON_CLEAN_TARGETS)
:
$(
MAKE
)
-C
$(
@:clean-%
=
%
)
clean_dist
.PHONY
:
telescope-build $(TELESCOPE_BUILD_TARGETS)
telescope-build
:
$(TELESCOPE_BUILD_TARGETS)
$(TELESCOPE_BUILD_TARGETS)
:
$(
MAKE
)
-C
$(
@:build-%
=
%
)
all
install
telescope-build
:
@
for
i
in
$(
TELESCOPE_MODULES_DIRS
);
do
\
$(
MAKE
)
-C
$${
i
}
all
;
\
$(
MAKE
)
-C
$${
i
}
install
;
\
done
.PHONY
:
telescope-clean $(TELESCOPE_CLEAN_TARGETS)
telescope-clean
:
$(TELESCOPE_CLEAN_TARGETS)
$(TELESCOPE_CLEAN_TARGETS)
:
$(
MAKE
)
-C
$(
@:clean-%
=
%
)
clean_dist
.PHONY
:
compile
compile
:
@
for
i
in
$(
BUILD_DIRS
);
do
\
make
-C
$${
i
}
all
;
\
$(
MAKE
)
-C
$${
i
}
all
;
\
done
.PHONY
:
install
install
:
@
for
i
in
$(
BUILD_DIRS
);
do
\
make
-C
$${
i
}
install
;
\
$(
MAKE
)
-C
$${
i
}
install
;
\
done
# cdb:
...
...
@@ -371,6 +305,11 @@ man:
@echo
"documentation done in $(DOC)"
legacy-all
:
@
for
i
in
$(
BUILD_DIRS
);
do
\
make
-C
$${
i
}
all
install
;
\
done
legacy-clean
:
@
rm
-rf
$(
INTROOT
)
/bin/
*
@
rm
-rf
$(
INTROOT
)
/config/CDB/schemas/
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment