Changeset 127

Show
Ignore:
Timestamp:
05/16/05 17:17:07
Author:
ben
Message:

Better behaviour:
a) Say where make is happening
b) configure.h lives in include
c) Makefiles work standalone
d) configure can (must) be run from top directory

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openpgpsdk/trunk/Makefile

    r125 r127  
    77SUBDIRS=src examples 
    88 
    9 CONFIGURE=$(PWD)/configure 
     9all: default include/configure.h 
    1010 
    11 default: Makefiles all 
    12  
    13 Makefiles: 
     11default: 
    1412        @for d in $(SUBDIRS); do \ 
    15         (cd $$d; make CONFIGURE=$(CONFIGURE) Makefile); \ 
     13        (cd $$d; echo "+++ make in $$d"; make; echo "--- $$d"); \ 
    1614        done 
    1715 
    18 all: 
    19         @for d in $(SUBDIRS); do \ 
    20         (cd $$d; make all); \ 
    21         done 
     16include/configure.h: include/configure.h.template configure 
     17        echo re-run configure 
    2218 
    2319force_depend: 
    2420        @for d in $(SUBDIRS); do \ 
    25         (cd $$d; make force_depend); \ 
     21        (cd $$d; echo "+++ make force_depend in $$d"; make force_depend ; echo "--- $$d"); \ 
    2622        done 
    2723 
    2824clean: 
    2925        @for d in $(SUBDIRS); do \ 
    30         (cd $$d; make clean); \ 
     26        (cd $$d; echo "+++ make clean in $$d"; make clean; echo "--- $$d"); \ 
    3127        done 
    3228 
  • openpgpsdk/trunk/configure

    r120 r127  
    5050fixSubst(); 
    5151 
    52 open(D,'>.depend') || croak "Can't create .depend"
    53 close D
     52create('src/.depend')
     53create('examples/.depend')
    5454 
    55 fileSubst('Makefile','#',''); 
    56 fileSubst('configure.h','/*','*/'); 
     55fileSubst('src/Makefile','#',''); 
     56fileSubst('examples/Makefile','#',''); 
     57fileSubst('include/configure.h','/*','*/'); 
    5758 
     59print "make clean\n"; 
    5860system 'make clean' || exit; 
     61print "make force_depend\n"; 
    5962system 'make force_depend' || exit; 
    6063 
     
    120123 
    121124    open(T,"$file.template") || croak "Can't open $file.template: $!"; 
     125    unlink $file; 
    122126    open(M,">$file") || croak "Can't create $file: $!"; 
    123127 
     
    139143    } 
    140144} 
     145 
     146sub create { 
     147    my $file=shift; 
     148 
     149    print "Creating $file\n"; 
     150    open(D,">$file") || croak "Can't create $file"; 
     151    close D; 
     152} 
     153 
  • openpgpsdk/trunk/examples/Makefile.template

    r122 r127  
    55CFLAGS=-Wall -Werror -g $(DM_FLAGS) -I../include  %INCLUDES% 
    66LDFLAGS=-g 
    7 LIBS=../src/libops.a -lcrypto -lz $(DM_LIB) 
     7LIBDEPS=../src/libops.a 
     8LIBS=$(LIBDEPS) -lcrypto -lz $(DM_LIB) 
    89 
    910all: Makefile .depend packet-dump  
    1011 
    11 packet-dump: packet-dump.o ../src/libops.a 
     12packet-dump: packet-dump.o $(LIBDEPS) 
    1213        $(CC) $(LDFLAGS) -o packet-dump packet-dump.o $(LIBS) 
    1314 
     
    2627        $(CC) $(CFLAGS) -E -MM *.c > .depend 
    2728 
    28 Makefile: Makefile.template $(CONFIGURE) 
     29Makefile: Makefile.template ../configure 
    2930        echo Makefile is older than templates, rerun configure. 
    3031        exit 1 
  • openpgpsdk/trunk/ref/draft-ietf-openpgp-rfc2440bis-12-comments.txt

    r52 r127  
    3838"The concatenation of the data to be signed, the signature type and 
    3939creation time from the signature packet (5 additional octets) is hashed." 
     40 
     41In 5.9: 
     42 
     43   " - File name as a string (one-octet length, followed by file name), 
     44       if the encrypted data should be saved as a file." 
     45 
     46but no mention of what if it shouldn't be saved as a file. 0 length, 
     47perhaps? 
     48 
     49Then: 
     50 
     51   " - A four-octet number that indicates the modification date of the 
     52       file, or the creation time of the packet, or a zero that 
     53       indicates the present time." 
     54 
     55I would _guess_ that it means modification date of the file if there's 
     56a filename, the creation time if there isn't. I have no idea what zero 
     57is supposed to mean. Nothing, would be the obvious interpretation - 
     58"the present time" is nonsensical. 
     59 
     60Once more, when I know what its supposed to mean, I'll suggest 
     61wording. 
     62 
  • openpgpsdk/trunk/src/Makefile.template

    r126 r127  
    3636        $(CC) $(CFLAGS) -E -MM *.c > .depend 
    3737 
    38 Makefile: Makefile.template $(CONFIGURE) 
     38Makefile: Makefile.template ../configure 
    3939        echo Makefile is older than templates, rerun configure. 
    4040        exit 1