Changes in / [cffb044:487cc2b]


Ignore:
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Makefile.am

    ra223b6b r78b9503  
    44GIT_FLAGS := $(if $(GIT_DESCRIPTION),-DGIT_VERSION=$(GIT_DESCRIPTION:barnowl-%=%))
    55
    6 bin_PROGRAMS = bin/barnowl
     6bin_PROGRAMS = barnowl.bin
    77if ENABLE_ZCRYPT
    88bin_PROGRAMS += zcrypt
     
    1111zcrypt_SOURCES = zcrypt.c filterproc.c
    1212
    13 check_PROGRAMS = bin/tester
     13check_PROGRAMS = tester.bin
    1414dist_check_DATA = t
    1515dist_check_SCRIPTS = runtests.sh
    1616
    17 noinst_SCRIPTS = barnowl
     17bin_SCRIPTS = barnowl
    1818check_SCRIPTS = tester
    1919
    20 barnowl tester: %: barnowl-wrapper.in bin/% Makefile
     20barnowl tester: %: barnowl-wrapper.in %.bin Makefile
    2121        sed \
    2222            -e 's,[@]abs_srcdir[@],$(abs_srcdir),g' \
     
    2525        chmod +x $@
    2626
    27 bin_barnowl_SOURCES = $(BASE_SRCS) \
     27barnowl_bin_SOURCES = $(BASE_SRCS) \
    2828     owl.h owl_perl.h \
    2929     owl.c
    30 nodist_bin_barnowl_SOURCES = $(GEN_C) $(GEN_H)
     30nodist_barnowl_bin_SOURCES = $(GEN_C) $(GEN_H)
    3131
    3232dist_man_MANS = doc/barnowl.1
    3333dist_doc_DATA = doc/intro.txt doc/advanced.txt
    3434
    35 bin_barnowl_LDADD = compat/libcompat.a libfaim/libfaim.a
     35barnowl_bin_LDADD = compat/libcompat.a libfaim/libfaim.a
    3636
    37 bin_tester_SOURCES = $(BASE_SRCS) \
     37tester_bin_SOURCES = $(BASE_SRCS) \
    3838     owl.h owl_perl.h \
    3939     tester.c
    40 nodist_bin_tester_SOURCES = $(GEN_C) $(GEN_H)
     40nodist_tester_bin_SOURCES = $(GEN_C) $(GEN_H)
    4141
    42 bin_tester_LDADD = compat/libcompat.a libfaim/libfaim.a
     42tester_bin_LDADD = compat/libcompat.a libfaim/libfaim.a
    4343
    4444TESTS=runtests.sh
     
    9696        $(COMPILE) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES)
    9797
    98 CLEANFILES = $(BUILT_SOURCES) $(noinst_SCRIPTS) $(check_SCRIPTS)
     98do_transform = $(shell echo '$(1)' | sed '$(transform)')
     99install-exec-hook:
     100        mv -f $(DESTDIR)$(bindir)/$(call do_transform,barnowl.bin) \
     101              $(DESTDIR)$(bindir)/$(call do_transform,barnowl)
     102
     103uninstall-local:
     104        rm -f $(DESTDIR)$(bindir)/$(call do_transform,barnowl)
     105
     106CLEANFILES = $(BUILT_SOURCES) $(bin_SCRIPTS) $(check_SCRIPTS)
    99107EXTRA_DIST = \
    100108    autogen.sh \
  • barnowl-wrapper.in

    ra223b6b r1dba5bd  
    11#!/bin/sh
    22# This is a wrapper script to point BARNOWL_DATA_DIR at the source dir
    3 # if we're running from a build tree. bin/barnowl is the actual built
     3# if we're running from a build tree. barnowl.bin is the actual built
    44# binary.
    55
    6 EXE="@abs_builddir@/bin/$(basename "$0")"
     6EXE="$0.bin"
    77
    88if test ! -x "$EXE"; then
  • configure.ac

    r0625919 r487cc2b  
    11dnl Process this file with autoconf to produce a configure script.
    22AC_INIT([BarnOwl],[1.10dev],[bug-barnowl@mit.edu])
    3 AM_INIT_AUTOMAKE([1.7.0 foreign std-options -Wall -Wno-portability])
     3AM_INIT_AUTOMAKE([1.7.0 -Wall -Wno-portability foreign])
    44AM_MAINTAINER_MODE([enable])
    55m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
  • owl.c

    r499224d re5210c9  
    3434} owl_options;
    3535
    36 void usage(FILE *file)
     36void usage(void)
    3737{
    38   fprintf(file, "Barnowl version %s\n", OWL_VERSION_STRING);
    39   fprintf(file, "Usage: barnowl [-n] [-d] [-D] [-v] [-h] [-c <configfile>] [-s <confdir>] [-t <ttyname>]\n");
    40   fprintf(file, "  -n,--no-subs        don't load zephyr subscriptions\n");
    41   fprintf(file, "  -d,--debug          enable debugging\n");
    42   fprintf(file, "  -v,--version        print the Barnowl version number and exit\n");
    43   fprintf(file, "  -h,--help           print this help message\n");
    44   fprintf(file, "  -s,--config-dir     specify an alternate config dir (default ~/.owl)\n");
    45   fprintf(file, "  -c,--config-file    specify an alternate config file (default ~/.owl/init.pl)\n");
    46   fprintf(file, "  -t,--tty            set the tty name\n");
     38  fprintf(stderr, "Barnowl version %s\n", OWL_VERSION_STRING);
     39  fprintf(stderr, "Usage: barnowl [-n] [-d] [-D] [-v] [-h] [-c <configfile>] [-s <confdir>] [-t <ttyname>]\n");
     40  fprintf(stderr, "  -n,--no-subs        don't load zephyr subscriptions\n");
     41  fprintf(stderr, "  -d,--debug          enable debugging\n");
     42  fprintf(stderr, "  -v,--version        print the Barnowl version number and exit\n");
     43  fprintf(stderr, "  -h,--help           print this help message\n");
     44  fprintf(stderr, "  -s,--config-dir     specify an alternate config dir (default ~/.owl)\n");
     45  fprintf(stderr, "  -c,--config-file    specify an alternate config file (default ~/.owl/init.pl)\n");
     46  fprintf(stderr, "  -t,--tty            set the tty name\n");
    4747}
    4848
     
    8383      exit(0);
    8484    case 'h':
    85       usage(stdout);
    86       exit(0);
    8785    default:
    88       usage(stderr);
     86      usage();
    8987      exit(1);
    9088    }
  • zcrypt.c

    r8f335a8 r6249a88f  
    1616#include <sys/wait.h>
    1717#include <ctype.h>
    18 #include <limits.h>
    19 #include <getopt.h>
    2018
    2119#include <config.h>
     
    2826
    2927#include "filterproc.h"
    30 
    31 #ifndef OWL_VERSION_STRING
    32 #ifdef  GIT_VERSION
    33 #define stringify(x)       __stringify(x)
    34 #define __stringify(x)     #x
    35 #define OWL_VERSION_STRING stringify(GIT_VERSION)
    36 #else
    37 #define OWL_VERSION_STRING PACKAGE_VERSION
    38 #endif
    39 #endif /* !OWL_VERSION_STRING */
    4028
    4129/* Annotate functions in which the caller owns the return value and is
     
    118106}
    119107
    120 void usage(FILE *file, const char *progname)
    121 {
    122   fprintf(file, "Usage: %s [-Z|-D|-E|-R|-S] [-F Keyfile] [-c class] [-i instance]\n", progname);
    123   fprintf(file, "       [-advqtluon] [-s signature] [-f arg] [-m message]\n");
    124   fprintf(file, "  One or more of class, instance, and keyfile must be specified.\n");
    125 }
    126 
    127108int main(int argc, char *argv[])
    128109{
     
    135116  int mode = M_NONE;
    136117
    137   int c;
     118  char c;
    138119
    139120  int messageflag = FALSE;
     
    141122  zoptions.flags = 0;
    142123
    143   enum {
    144     OPT_VERSION = CHAR_MAX + 1,
    145     OPT_HELP,
    146   };
    147   static const struct option options[] = {
    148     {"version", no_argument, NULL, OPT_VERSION},
    149     {"help", no_argument, NULL, OPT_HELP},
    150     {NULL, 0, NULL, 0}
    151   };
    152 
    153   while ((c = getopt_long(argc, argv, "ZDERSF:c:i:advqtluons:f:m", options, NULL)) != -1)
     124  while ((c = getopt(argc, argv, "ZDERSF:c:i:advqtluons:f:m")) != (char)EOF)
    154125  {
    155126    switch(c)
    156127    {
    157       case OPT_VERSION:
    158         /* Version */
    159         printf("This is zcrypt version %s\n", OWL_VERSION_STRING);
    160         exit(0);
    161       case OPT_HELP:
    162         /* Help */
    163         usage(stdout, argv[0]);
    164         exit(0);
    165128      case 'Z':
    166129        /* Zephyr encrypt */
     
    294257  if (error || !cryptspec)
    295258  {
    296     usage(stderr, argv[0]);
     259    fprintf(stderr, "Usage: %s [-Z|-D|-E|-R|-S] [-F Keyfile] [-c class] [-i instance]\n", argv[0]);
     260    fprintf(stderr, "       [-advqtluon] [-s signature] [-f arg] [-m message]\n");
     261    fprintf(stderr, "  One or more of class, instance, and keyfile must be specified.\n");
    297262    exit(1);
    298263  }
Note: See TracChangeset for help on using the changeset viewer.