1 #
   2 #
   3 #
   4 
   5 DESTDIR=..
   6 FOODIR=foo-contents
   7 BARDIR=bar-contents
   8 
   9 all: $(DESTDIR)/fooprovider.jar $(DESTDIR)/barprovider.jar
  10 
  11 FOOSERVICES = \
  12         java.text.spi.BreakIteratorProvider \
  13         java.text.spi.CollatorProvider \
  14         java.text.spi.DateFormatProvider \
  15         java.text.spi.DateFormatSymbolsProvider \
  16         java.text.spi.DecimalFormatSymbolsProvider \
  17         java.text.spi.NumberFormatProvider 
  18 
  19 BARSERVICES = \
  20         java.util.spi.CurrencyNameProvider \
  21         java.util.spi.TimeZoneNameProvider \
  22         java.util.spi.LocaleNameProvider \
  23         java.util.spi.CalendarDataProvider \
  24         java.util.spi.CalendarNameProvider
  25 
  26 FOOFILES_JAVA = \
  27     BreakIteratorProviderImpl.java \
  28     CollatorProviderImpl.java \
  29     DateFormatProviderImpl.java \
  30     DateFormatSymbolsProviderImpl.java \
  31     DecimalFormatSymbolsProviderImpl.java \
  32     NumberFormatProviderImpl.java \
  33     FooDateFormat.java \
  34     FooNumberFormat.java \
  35     Utils.java
  36 
  37 BARFILES_JAVA = \
  38     CurrencyNameProviderImpl.java \
  39     CurrencyNameProviderImpl2.java \
  40     TimeZoneNameProviderImpl.java \
  41     LocaleNameProviderImpl.java \
  42     CalendarDataProviderImpl.java \
  43     CalendarNameProviderImpl.java \
  44     Utils.java
  45 
  46 BARFILES_PROPERTIES = \
  47     LocaleNames.properties \
  48     LocaleNames_ja.properties \
  49     LocaleNames_ja_JP_osaka.properties \
  50     LocaleNames_ja_JP_kyoto.properties \
  51     LocaleNames_xx.properties
  52 
  53 $(DESTDIR)/fooprovider.jar: $(FOOSERVICES) $(FOOFILES_JAVA)
  54         rm -rf $(FOODIR)
  55         mkdir -p $(FOODIR)
  56         mkdir -p $(FOODIR)/META-INF
  57         mkdir -p $(FOODIR)/META-INF/services
  58         $(BINDIR)/javac -d $(FOODIR) $(FOOFILES_JAVA)
  59         cp $(FOOSERVICES) $(FOODIR)/META-INF/services
  60         rm -f $(DESTDIR)/fooprovider.jar
  61         $(BINDIR)/jar  cvf $(DESTDIR)/fooprovider.jar -C $(FOODIR) .
  62 
  63 $(DESTDIR)/barprovider.jar: $(BARSERVICES) $(BARFILES_JAVA) $(BARFILES_PROPERTIES)
  64         rm -rf $(BARDIR)
  65         mkdir -p $(BARDIR)
  66         mkdir -p $(BARDIR)/META-INF
  67         mkdir -p $(BARDIR)/META-INF/services
  68         $(BINDIR)/javac -d $(BARDIR) $(BARFILES_JAVA)
  69         cp $(BARSERVICES) $(BARDIR)/META-INF/services
  70         cp $(BARFILES_PROPERTIES) $(BARDIR)/com/bar
  71         rm -f $(DESTDIR)/barprovider.jar
  72         $(BINDIR)/jar  cvf $(DESTDIR)/barprovider.jar -C $(BARDIR) .
  73 
  74 clean:
  75         rm -rf $(BARDIR) $(FOODIR)
  76 
  77 .PHONY: all clean