IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6436


Ignore:
Timestamp:
Feb 16, 2006, 2:28:56 PM (20 years ago)
Author:
jhoblitt
Message:

require template dirs to have a config.pl file describing the template file output paths

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/glueforge/glueforge.in

    r5965 r6436  
    33# Copyright (C) 2005-2006  Joshua Hoblitt
    44#
    5 # $Id: glueforge.in,v 1.42 2006-01-11 02:39:16 jhoblitt Exp $
     5# $Id: glueforge.in,v 1.43 2006-02-17 00:28:56 jhoblitt Exp $
    66
    77use strict;
     
    5050$output = $data->{pkg_name} unless defined $output;
    5151
    52 my %tt = (
    53     'autogen_sh.tt'         => "$output/autogen.sh",
    54     'configure_ac.tt'       => "$output/configure.ac",
    55     'pkgconfig_pc_in.tt'    => "$output/$data->{pkg_name}.pc.in",
    56     'doxyfile_in.tt'        => "$output/Doxyfile.in",
    57     'top_makefile_am.tt'    => "$output/Makefile.am",
    58     'src_makefile_am.tt'    => "$output/src/Makefile.am",
    59     'header.tt'             => "$output/src/$data->{pkg_name}.h",
    60     'code.tt'               => "$output/src/$data->{pkg_name}.c",
    61     'tests_makefile_am.tt'  => "$output/tests/Makefile.am",
    62     'testsuite_at.tt'       => "$output/tests/testsuite.at",
    63     'dbsetup_c.tt'          => "$output/tests/dbsetup.c",
    64     'dbcleanup_c.tt'        => "$output/tests/dbcleanup.c",
    65     'alloc_c.tt'            => "$output/tests/alloc.c",
    66     'init_c.tt'             => "$output/tests/init.c",
    67     'cleanup_c.tt'          => "$output/tests/cleanup.c",
    68     'createtable_c.tt'      => "$output/tests/createtable.c",
    69     'droptable_c.tt'        => "$output/tests/droptable.c",
    70     'insert_c.tt'           => "$output/tests/insert.c",
    71     'pop_c.tt'              => "$output/tests/pop.c",
    72     'insertobject_c.tt'     => "$output/tests/insertobject.c",
    73     'popobject_c.tt'        => "$output/tests/popobject.c",
    74     'insertfits_c.tt'       => "$output/tests/insertfits.c",
    75     'popfits_c.tt'          => "$output/tests/popfits.c",
    76     'selectrowsfits_c.tt'   => "$output/tests/selectrowsfits.c",
    77     'metadatafromobject_c.tt' => "$output/tests/metadatafromobject.c",
    78     'objectfrommetadata_c.tt' => "$output/tests/objectfrommetadata.c",
    79 );
     52my %tt;
     53{
     54    # slurp config.pl
     55    open(my $fh, "$template/config.pl")
     56        or die "can't open $template/config.pl: $!";
     57    my $ttconfig = do {local $/; <$fh>};
     58    close($fh) or die "can't close $template/config.pl: $!";
     59}
     60
     61# configure template file paths
     62eval $ttconfig;
     63die "can't eval contents of $template/config.pl: $@" if $@;
    8064
    8165my $mangler = Template->new({ INCLUDE_PATH => $template });
Note: See TracChangeset for help on using the changeset viewer.