File: genmakefile.cpp

package info (click to toggle)
odin 2.0.5-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,196 kB
  • sloc: cpp: 62,638; sh: 4,541; makefile: 779
file content (35 lines) | stat: -rw-r--r-- 928 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <odinseq/seqmakefile.h>

/**
  * \page genmakefile Generate a Makefile for ODIN sequences
  * \verbinclude cmdline-utils/genmakefile.usage
  */

void usage() {
  STD_cout << "genmakefile: Generates a Makefile for ODIN methods" << STD_endl;
  STD_cout << configInfo() << STD_endl;
  STD_cout << STD_endl;
  STD_cout << "Usage: genmakefile [options] <method-label>" << STD_endl;
  STD_cout << "Options:" << STD_endl;
  STD_cout << "\t" << LogBase::get_usage() << STD_endl;
  STD_cout << "\t" << helpUsage() << STD_endl;
}

int main(int argc, char* argv[]) {
  LogBase::set_log_levels(argc,argv);
  if(hasHelpOption(argc,argv)) {usage(); return 0;}

  char buff[ODIN_MAXCHAR];

  if(argc<=1) {usage(); exit(0);}

  STD_string methlabel;
  if(getLastArgument(argc,argv,buff,ODIN_MAXCHAR)) {
    methlabel=buff;
  }

  SeqMakefile mf(methlabel,INSTALL_PREFIX);
  STD_cout << mf.get_Makefile(".") << STD_endl;

  return 0;
}