gana

GNUnet Assigned Numbers Authority
Log | Files | Refs | README | LICENSE

Makefile (3117B)


      1 FILES=taler_error_codes.h \
      2   taler_error_codes.c \
      3   taler_error_codes.ts \
      4   taler_error_codes.py \
      5   taler_error_codes.kt \
      6   taler_error_codes.go \
      7   taler_error_codes.rs \
      8   taler_error_codes.rst
      9 
     10 all: check $(FILES)
     11 
     12 check: registry.rec
     13 	recfix --check registry.rec
     14 
     15 distclean:
     16 	rm -f *.tmp
     17 
     18 clean:
     19 	rm -f $(FILES) *.tmp
     20 
     21 prep:
     22 	cd ../http-status-codes; make ; cd -
     23 
     24 # Because prep is phony, this rule always triggers. To avoid
     25 # combined.tmp cascading into triggering the other rules even
     26 # if nothing changed, we use 'diff' to make sure that 'recsel'
     27 # actually changed the result.
     28 combined.tmp: registry.rec prep
     29 	recsel -t TalerErrorCode -j HttpStatus -p Description,Name,Value,HttpStatus,HttpStatus.Value,HttpStatus.Identifier ../http-status-codes/registry.rec registry.rec > combined.xtmp
     30 	if ! diff $@ combined.xtmp > /dev/null; then mv combined.xtmp $@; else rm combined.xtmp; fi
     31 
     32 combined-escaped.tmp: combined.tmp
     33 	sed 's/"/\\"/g' $^ > $@
     34 
     35 length.tmp: combined.tmp
     36 	recsel -p "Count(Description):ECS_LENGTH" combined.tmp > $@
     37 
     38 taler_error_codes.h.tmp: combined.tmp h.template
     39 	../format.sh h.template < combined.tmp > $@
     40 
     41 taler_error_codes.h: h.header taler_error_codes.h.tmp h.footer
     42 	cat $^ | sed -e "s/= 0000/= 0/" -e "s/= 000/= /" -e "s/= 00/= /" > $@
     43 
     44 taler_error_codes.c.tmp: combined-escaped.tmp c.template
     45 	../format.sh c.template < combined-escaped.tmp > $@
     46 
     47 taler_error_codes-length.c.tmp: length.tmp c-length.template
     48 	../format.sh c-length.template < length.tmp > $@
     49 
     50 taler_error_codes.c: c.header taler_error_codes.c.tmp taler_error_codes-length.c.tmp c.footer
     51 	cat $^ > $@
     52 
     53 taler_error_codes.ts.tmp: combined.tmp ts.template
     54 	../format.sh ts.template < combined.tmp > $@
     55 
     56 taler_error_codes.ts: ts.header taler_error_codes.ts.tmp ts.footer
     57 	cat $^ | sed -e "s/= 0000/= 0/" -e "s/= 000/= /" -e "s/= 00/= /" > $@
     58 
     59 taler_error_codes.kt.tmp: combined-escaped.tmp kt.template
     60 	../format.sh kt.template < combined-escaped.tmp > $@
     61 
     62 taler_error_codes.kt: kt.header taler_error_codes.kt.tmp kt.footer
     63 	cat $^ | sed -e "s/(0000)/(0)/" -e "s/(000/(/" -e "s/(00/(/" > $@
     64 
     65 taler_error_codes.py.tmp: combined.tmp py.template
     66 	../format.sh py.template < combined.tmp > $@
     67 
     68 taler_error_codes.py: py.header taler_error_codes.py.tmp
     69 	cat $^ > $@
     70 
     71 taler_error_codes.go.tmp: combined.tmp go.template
     72 	../format.sh go.template < combined.tmp > $@
     73 
     74 taler_error_codes.go: go.header taler_error_codes.go.tmp go.footer
     75 	cat $^ > taler_error_codes.go.oct.tmp
     76 	sed -r 's/= 00*([0-9])/= \1/g' taler_error_codes.go.oct.tmp > $@
     77 
     78 taler_error_codes.rst.tmp: combined.tmp rst.template
     79 	../format.sh rst.template < combined.tmp > $@
     80 
     81 taler_error_codes.rst: rst.header taler_error_codes.rst.tmp rst.footer
     82 	cat $^ > $@
     83 
     84 taler_error_codes.rs_enum.tmp: combined.tmp rs.enum_template
     85 	../format.sh rs.enum_template < combined.tmp > $@
     86 
     87 taler_error_codes.rs_impl.tmp: combined-escaped.tmp rs.impl_template
     88 	../format.sh rs.impl_template < combined-escaped.tmp > $@
     89 
     90 taler_error_codes.rs: rs.header taler_error_codes.rs_enum.tmp rs.impl taler_error_codes.rs_impl.tmp rs.footer
     91 	cat $^ > $@
     92 
     93 .PHONY: check clean distclean prep