Home » Eclipse Projects » DSDP - Real-Time Software Components (RTSC) » requires keyword in package.xdc
requires keyword in package.xdc [message #1171815] |
Tue, 05 November 2013 13:59  |
James Lockwood Messages: 43 Registered: July 2009 |
Member |
|
|
A have a package "pkgA" that builds for many targets. pkgA requires another package "pgkB". pkgB only has one module "modC". This module declares macro functions (with @Macro) in its .xdc file. My modC__epilogue.h file declares the macros appropriately based upon the target.
When building pkgA, everything goes well. pkgB gets its .interfaces built, which is exactly what I am after with the use of the "requires" keyword in pkgA's package.xdc file.
When cleaning pkgA, as long as I clean everything, it goes well. But when I try to clean with the goal of only cleaning for a particular target (example "xdc clean,28L"), when it gets to dependent package pkgB, I get the error of
gmake[1]: *** No rule to make target `clean,28L'. Stop.
Certainly understandable because there is no library being built.
But is there any way to circumvent this error without adding a dummy blank library for each target I might be building/cleaning?
[Updated on: Tue, 05 November 2013 14:00] Report message to a moderator
|
|
| |
Re: requires keyword in package.xdc [message #1176876 is a reply to message #1171815] |
Fri, 08 November 2013 16:12   |
James Lockwood Messages: 43 Registered: July 2009 |
Member |
|
|
I have a customized build system using Eclipse, but essentially
command to build "pkgA" is
xdc .libraries,28L -PD .
command to clean "pkgA" is
xdc clean,28L -PD .
But, let's just focus on the macro only module in "pkgB". Since it doesn't actually have any .c source files to build a library for any particular target, the package.mak that is generated has no xdc-target-specific make "targets". Package.mak only has the generalized make targets of ".interfaces", ".libraries", ".dlls", ".executables", "all" and "clean". --- ".libraries,28L", "executables,28L" and the like do not exist.
The only way to clean pkgB is to issue "xdc clean" without specifying a ",<xdcTarget>" after "clean".
pkgA can build with "xdc .libraries,28L" because all it really requires from pkgB is its interfaces which is not specific to any xdc target.
Since pkgA builds real libraries from source code, it's package.mak has all the additional xdc-target-specific make goals because the addLibrary function of xdc.bld.PackageContents was used, and it knows about each target.
When pkgA is cleaned by the command "xdc clean,28L", if its package requires other packages, it seems as if the same "clean,28L" is blindly passed to all other required packages, and this is where the problem lies. It instead should pass "clean" to pkgB because it is a package that has no xdc-target-specific libraries. It only has one module that declares macros in a header file. If it had other modules that had libraries built for 28L, then its package.mak would have the "clean,28L" make target and everything would clean fine. That is why I have added a blank dummy library.
----edit ---- I need to look at this more before anyone responds. It appears there really are targets in pkgB... Please hold off on any responses until the next message.
[Updated on: Fri, 08 November 2013 16:19] Report message to a moderator
|
|
|
Re: requires keyword in package.xdc [message #1176895 is a reply to message #1176876] |
Fri, 08 November 2013 16:26   |
James Lockwood Messages: 43 Registered: July 2009 |
Member |
|
|
Ok, it appears that just clean does not have the xdc-target-specific make targets for pkgB:
Here is my package.mak
#
# Do not edit this file. This file is generated from
# package.bld. Any modifications to this file will be
# overwritten whenever makefiles are re-generated.
#
unexport MAKEFILE_LIST
MK_NOGENDEPS := $(filter clean,$(MAKECMDGOALS))
override PKGDIR = trust/pkgB
XDCINCS = -I. -I$(strip $(subst ;, -I,$(subst $(space),\$(space),$(XPKGPATH))))
XDCCFGDIR = package/cfg/
#
# The following dependencies ensure package.mak is rebuilt
# in the event that some included BOM script changes.
#
ifneq (clean,$(MAKECMDGOALS))
C:/ti/xdctools_3_25_03_72/packages/xdc/utils.js:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/utils.js
C:/ti/xdctools_3_25_03_72/packages/xdc/xdc.tci:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/xdc.tci
C:/ti/xdctools_3_25_03_72/packages/xdc/template.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/template.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/om2.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/om2.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/xmlgen.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/xmlgen.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/xmlgen2.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/xmlgen2.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/Warnings.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/Warnings.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/IPackage.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/IPackage.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/package.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/package.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/services/global/Clock.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/services/global/Clock.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/services/global/Trace.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/services/global/Trace.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/bld.js:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/bld.js
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/BuildEnvironment.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/BuildEnvironment.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/PackageContents.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/PackageContents.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/_gen.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/_gen.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/Library.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/Library.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/Executable.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/Executable.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/Repository.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/Repository.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/Configuration.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/Configuration.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/Script.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/Script.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/Manifest.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/Manifest.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/Utils.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/Utils.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/ITarget.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/ITarget.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/ITarget2.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/ITarget2.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/ITarget3.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/ITarget3.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/ITargetFilter.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/ITargetFilter.xs
C:/ti/xdctools_3_25_03_72/packages/xdc/bld/package.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/xdc/bld/package.xs
package.mak: config.bld
C:/Projects/TrustRepo/trust/utils/build/Build.xs:
package.mak: C:/Projects/TrustRepo/trust/utils/build/Build.xs
C:/Projects/TrustRepo/trust/utils/build/Main.xs:
package.mak: C:/Projects/TrustRepo/trust/utils/build/Main.xs
C:/Projects/TrustRepo/trust/utils/build/MemorySections.xs:
package.mak: C:/Projects/TrustRepo/trust/utils/build/MemorySections.xs
C:/Projects/TrustRepo/trust/utils/build/Tracker.xs:
package.mak: C:/Projects/TrustRepo/trust/utils/build/Tracker.xs
C:/Projects/TrustRepo/trust/utils/build/package.xs:
package.mak: C:/Projects/TrustRepo/trust/utils/build/package.xs
C:/Projects/TrustRepo/trust/utils/build/_package.xs:
package.mak: C:/Projects/TrustRepo/trust/utils/build/_package.xs
C:/ti/xdctools_3_25_03_72/packages/ti/targets/ITarget.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/ti/targets/ITarget.xs
C:/ti/xdctools_3_25_03_72/packages/ti/targets/C28_large.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/ti/targets/C28_large.xs
C:/ti/xdctools_3_25_03_72/packages/ti/targets/C28_float.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/ti/targets/C28_float.xs
C:/ti/xdctools_3_25_03_72/packages/ti/targets/package.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/ti/targets/package.xs
C:/ti/xdctools_3_25_03_72/packages/ti/targets/arm/elf/IArm.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/ti/targets/arm/elf/IArm.xs
C:/ti/xdctools_3_25_03_72/packages/ti/targets/arm/elf/package.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/ti/targets/arm/elf/package.xs
C:/Projects/TrustRepo/trust/targets/ITarget.xs:
package.mak: C:/Projects/TrustRepo/trust/targets/ITarget.xs
C:/Projects/TrustRepo/trust/targets/C28_float.xs:
package.mak: C:/Projects/TrustRepo/trust/targets/C28_float.xs
C:/Projects/TrustRepo/trust/targets/C28_large.xs:
package.mak: C:/Projects/TrustRepo/trust/targets/C28_large.xs
C:/Projects/TrustRepo/trust/targets/package.xs:
package.mak: C:/Projects/TrustRepo/trust/targets/package.xs
C:/ti/xdctools_3_25_03_72/packages/gnu/targets/ITarget.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/gnu/targets/ITarget.xs
C:/ti/xdctools_3_25_03_72/packages/gnu/targets/Linux86.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/gnu/targets/Linux86.xs
C:/ti/xdctools_3_25_03_72/packages/gnu/targets/Mingw.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/gnu/targets/Mingw.xs
C:/ti/xdctools_3_25_03_72/packages/gnu/targets/package.xs:
package.mak: C:/ti/xdctools_3_25_03_72/packages/gnu/targets/package.xs
C:/Projects/TrustRepo/trust/targets/rabbit/ITarget.xs:
package.mak: C:/Projects/TrustRepo/trust/targets/rabbit/ITarget.xs
C:/Projects/TrustRepo/trust/targets/rabbit/package.xs:
package.mak: C:/Projects/TrustRepo/trust/targets/rabbit/package.xs
package.mak: package.bld
C:/Projects/TrustRepo/trust/utils/setBuildPlatform/BuildPlatformInfo.xs:
package.mak: C:/Projects/TrustRepo/trust/utils/setBuildPlatform/BuildPlatformInfo.xs
C:/Projects/TrustRepo/trust/utils/setBuildProfile/BuildProfile.xs:
package.mak: C:/Projects/TrustRepo/trust/utils/setBuildProfile/BuildProfile.xs
endif
all,em3 .libraries,em3 .dlls,em3 .executables,em3 test,em3:;
all,28FP .libraries,28FP .dlls,28FP .executables,28FP test,28FP:;
all,28L .libraries,28L .dlls,28L .executables,28L test,28L:;
all,86GW .libraries,86GW .dlls,86GW .executables,86GW test,86GW:;
all,RAB .libraries,RAB .dlls,RAB .executables,RAB test,RAB:;
all: .executables
.executables: .libraries .dlls
.libraries: .interfaces
PKGCFGS := $(wildcard package.xs) package/build.cfg
.interfaces: package/package.xdc.inc package/package.defs.h package.xdc $(PKGCFGS)
-include package/package.xdc.dep
package/%.xdc.inc package/%_trust.pkgB.c package/%.defs.h: %.xdc $(PKGCFGS)
@$(MSG) generating interfaces for package trust.pkgB" (because $@ is older than $(firstword $?))" ...
$(XSRUN) -f xdc/services/intern/cmd/build.xs $(MK_IDLOPTS) -m package/package.xdc.dep -i package/package.xdc.inc package.xdc
ifeq (,$(MK_NOGENDEPS))
-include package/package.cfg.dep
endif
package/rel/undefinedtrust/pkgBpackage/package.rel.xml: package/package.cfg.xdc.inc
package/package.cfg.xdc.inc: $(XDCROOT)/packages/xdc/cfg/cfginc.js package.xdc
@$(MSG) generating schema include file list ...
$(CONFIG) -f $(XDCROOT)/packages/xdc/cfg/cfginc.js trust.pkgB $@
test:;
%,copy:
@$(if $<,,$(MSG) don\'t know how to build $*; exit 1)
@$(MSG) cp $< $@
$(RM) $@
$(CP) $< $@
$(XDCCFGDIR)%.c $(XDCCFGDIR)%.h $(XDCCFGDIR)%.xdl: $(XDCCFGDIR)%.cfg .interfaces $(XDCROOT)/packages/xdc/cfg/Main.xs
@$(MSG) "configuring $(_PROG_NAME) from $< ..."
$(CONFIG) $(_PROG_XSOPTS) xdc.cfg $(_PROG_NAME) $(XDCCFGDIR)$*.cfg $(XDCCFGDIR)$*
.PHONY: release,trust_pkgB
trust_pkgB.tar: package/package.bld.xml
trust_pkgB.tar: package/build.cfg
trust_pkgB.tar: package/package.xdc.inc
trust_pkgB.tar: package/package.cfg.xdc.inc
ifeq (,$(MK_NOGENDEPS))
-include package/rel/trust_pkgB.tar.dep
endif
package/rel/trust_pkgB/trust/pkgB/package/package.rel.xml: .force
@$(MSG) generating external release references $@ ...
$(XS) $(JSENV) -f $(XDCROOT)/packages/xdc/bld/rel.js $(MK_RELOPTS) . $@
trust_pkgB.tar: package/rel/trust_pkgB.xdc.inc package/rel/trust_pkgB/trust/pkgB/package/package.rel.xml
@$(MSG) making release file $@ "(because of $(firstword $?))" ...
-$(RM) $@
$(call MKRELTAR,package/rel/trust_pkgB.xdc.inc,package/rel/trust_pkgB.tar.dep)
release release,trust_pkgB: all trust_pkgB.tar
clean:: .clean
-$(RM) trust_pkgB.tar
-$(RM) package/rel/trust_pkgB.xdc.inc
-$(RM) package/rel/trust_pkgB.tar.dep
clean:: .clean
-$(RM) .libraries .libraries,*
clean::
-$(RM) .dlls .dlls,*
#
# The following clean rule removes user specified
# generated files or directories.
#
ifneq (clean,$(MAKECMDGOALS))
ifeq (,$(wildcard package))
$(shell $(MKDIR) package)
endif
ifeq (,$(wildcard package/cfg))
$(shell $(MKDIR) package/cfg)
endif
ifeq (,$(wildcard package/lib))
$(shell $(MKDIR) package/lib)
endif
ifeq (,$(wildcard package/rel))
$(shell $(MKDIR) package/rel)
endif
ifeq (,$(wildcard package/internal))
$(shell $(MKDIR) package/internal)
endif
endif
clean::
-$(RMDIR) package
|
|
|
Re: requires keyword in package.xdc [message #1177236 is a reply to message #1176895] |
Fri, 08 November 2013 21:37   |
James Lockwood Messages: 43 Registered: July 2009 |
Member |
|
|
I made the following changes to xdc/bld/_gen.xs which fixes this problem. It is around line 300.
/* generate all libraries */
var pkgLibsBuilt = [];
for (var i in pkg.$private.libraries) {
pkgLibsBuilt.push(pkg.$private.libraries[i].target.suffix)
_mkLib(pkg, pkg.$private.libraries[i], out);
}
// make clean,<targetSuffix> rules for targets that do not have libraries
for (i = 0; i < targets.length; i++) {
var pkgLibWasBuilt = false;
for (j =0; j < pkgLibsBuilt.length; j++) {
if (targets[i].suffix == pkgLibsBuilt[j]) {
pkgLibWasBuilt = true;
}
}
if (pkgLibWasBuilt == false) {
out.write("clean," + targets[i].suffix + "::\n");
}
}
If this could be implemented (or something similar) in future releases of XDCTools so I don't have to add it every time, or otherwise build a dummy library, I'd like that.
[Updated on: Fri, 08 November 2013 22:01] Report message to a moderator
|
|
| | |
Goto Forum:
Current Time: Fri Sep 22 23:04:19 GMT 2023
Powered by FUDForum. Page generated in 0.01487 seconds
|