Changes to create <name>Include.dbd from <name>_DBD files.
This commit is contained in:
+12
-1
@@ -11,13 +11,16 @@
|
||||
|
||||
##################################################### vpath
|
||||
|
||||
vpath %.dbd $(USR_VPATH) $(GENERIC_SRC_DIRS) $(dir $(DBD)) $(COMMON_DIR)
|
||||
vpath %.dbd $(USR_VPATH) $(GENERIC_SRC_DIRS) $(dir $(DBD)) $(COMMON_DIR) \
|
||||
$(subst -I,,$(RELEASE_DBDFLAGS))
|
||||
vpath %.db $(USR_VPATH) $(GENERIC_SRC_DIRS) $(dir $(DB)) $(COMMON_DIR)
|
||||
vpath %.vdb $(USR_VPATH) $(GENERIC_SRC_DIRS) $(dir $(DB)) $(COMMON_DIR)
|
||||
vpath %.substitutions $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)
|
||||
vpath %.template $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)
|
||||
vpath bpt%.data $(USR_VPATH) $(GENERIC_SRC_DIRS) $(COMMON_DIR)
|
||||
|
||||
#vpath %Include.dbd $(COMMON_DIR)
|
||||
|
||||
##################################################### dbdflags
|
||||
|
||||
# dbExpand
|
||||
@@ -213,6 +216,14 @@ $(COMMON_DIR)/%.dbd: %Include.dbd
|
||||
@$(RM) $@
|
||||
$(DBEXPAND) $(DBDFLAGS) -o $@ $<
|
||||
|
||||
$(COMMON_DIR)/%Include.dbd:
|
||||
@$(RM) $@
|
||||
$(PERL) $(TOOLS)/makeIncludeDbd.pl $($*_DBD) $@
|
||||
|
||||
$(INSTALL_DBD)/%: $(COMMON_DIR)/%
|
||||
@echo "Installing dbd file $@"
|
||||
@$(INSTALL) -d -m 644 $< $(@D)
|
||||
|
||||
$(INSTALL_DBD)/%: %
|
||||
@echo "Installing dbd file $@"
|
||||
@$(INSTALL) -d -m 644 $< $(@D)
|
||||
|
||||
@@ -79,7 +79,7 @@ ifneq (,$(strip $(PROD) $(TESTPROD) $(LIBRARY) $(LOADABLE_LIBRARY)))
|
||||
|
||||
MakefileInclude: ../Makefile
|
||||
@$(RM) $@
|
||||
@$(PERL) $(TOOLS)/makeMakefileInclude.pl $(PROD) $(TESTPROD) $(LIBRARY) $(LOADABLE_LIBRARY) $@
|
||||
@$(PERL) $(TOOLS)/makeMakefileInclude.pl $(PROD) $(TESTPROD) $(LIBRARY) $(LOADABLE_LIBRARY) $(DBD) $@
|
||||
|
||||
-include MakefileInclude
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/perl
|
||||
#*************************************************************************
|
||||
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
||||
# National Laboratory.
|
||||
# Copyright (c) 2002 The Regents of the University of California, as
|
||||
# Operator of Los Alamos National Laboratory.
|
||||
# EPICS BASE Versions 3.13.7
|
||||
# and higher are distributed subject to a Software License Agreement found
|
||||
# in file LICENSE that is included with this distribution.
|
||||
#*************************************************************************
|
||||
#
|
||||
# UNIX-cp in Perl
|
||||
|
||||
use File::Copy;
|
||||
use File::Basename;
|
||||
|
||||
sub Usage
|
||||
{
|
||||
my ($txt) = @_;
|
||||
|
||||
print "Usage:\n";
|
||||
print "\tcp file1 file2\n";
|
||||
print "\tcp file [ file2 file3 ...] directory\n";
|
||||
print "\nError: $txt\n" if $txt;
|
||||
|
||||
exit 2;
|
||||
}
|
||||
|
||||
# need at least two args: ARGV[0] and ARGV[1]
|
||||
Usage("need more args") if $#ARGV < 1;
|
||||
|
||||
$target=$ARGV[$#ARGV];
|
||||
@sources=@ARGV[0..$#ARGV-1];
|
||||
|
||||
open(OUT, "> $target") or die "Cannot create $target\n";;
|
||||
foreach $file ( @sources )
|
||||
{
|
||||
$base=basename($file);
|
||||
print OUT "include \"$base\"\n";
|
||||
}
|
||||
|
||||
close OUT;
|
||||
|
||||
# EOF makeIncludeDbd.pl
|
||||
|
||||
@@ -39,6 +39,7 @@ print OUT "#Do not modify this file.\n";
|
||||
print OUT "#This file is created during the build.\n";
|
||||
|
||||
foreach $name ( @nameList ) {
|
||||
if ( $name !~ m/\.dbd$/ ) {
|
||||
print OUT "\n";
|
||||
print OUT "ifneq (\$(strip \$(${name}_SRCS_\$(OS_CLASS))),)\n";
|
||||
print OUT "${name}_SRCS+=\$(subst -nil-,,\$(${name}_SRCS_\$(OS_CLASS)))\n";
|
||||
@@ -158,6 +159,13 @@ foreach $name ( @nameList ) {
|
||||
print OUT "\$(LOADABLE_SHRLIB_PREFIX)${name}\$(LOADABLE_SHRLIB_SUFFIX):\$(${name}_DLL_DEPLIBS)\n";
|
||||
print OUT "endif\n";
|
||||
print OUT "\n";
|
||||
} else {
|
||||
print OUT "ifneq (\$(\$(patsubst %.dbd,%,${name})_DBD),)\n";
|
||||
print OUT "${name}:\$(patsubst %.dbd,\$(COMMON_DIR)\/%Include.dbd,${name})\n";
|
||||
print OUT "\$(patsubst %.dbd,\$(COMMON_DIR)\/%Include.dbd,${name}):\$(\${patsubst %.dbd,%,${name}}_DBD)\n";
|
||||
print OUT "endif\n";
|
||||
print OUT "\n";
|
||||
}
|
||||
}
|
||||
close OUT or die "Cannot close $outfile: $!";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user