39 40 # Append demo goals to this variable. 41 BUILD_DEMOS = 42 43 # The demo structure and contents should really be cleaned up. 44 # Now every other demo has its own quirks where to put the 45 # READMEs and other files. 46 47 ################################################################################################## 48 49 define SetupAppletDemo 50 $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1, \ 51 SETUP := GENERATE_USINGJDKBYTECODE, \ 52 SRC := $(JDK_TOPDIR)/src/$3share/demo/applets/$1, \ 53 BIN := $(JDK_OUTPUTDIR)/demo/applets/$1, \ 54 COPY := .html .java .xyz .obj .au .gif, \ 55 DISABLE_SJAVAC := $2)) 56 BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1) 57 endef 58 59 60 ################################################################################################## 61 62 PATTERNS_TO_COPY = .html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf .xyz .obj 63 64 define SetupDemo 65 # Param 1 = Name of the demo 66 # Param 2 = Subdirectory of the demo below the demo directory. 67 # Param 3 = Additional javac flags. 68 # Param 4 = The main class for the jar. 69 # Param 5 = Additional source directory. 70 # Param 6 = Extra dir below $(JDK_TOPDIR)/src (closed) 71 # Param 7 = List of files to copy 72 # Param 8 = Base name of jar file. Defaults to $1 73 # Param 9 = Exclude list 74 # Param 10 = Extra copy patterns 75 # Param 11 = Extra manifest attribute 76 # Param 12 = Suffix for compiler setup name 77 78 # In some demos the source is found in a subdir called src. 120 endif 121 122 endef 123 124 $(eval $(call SetupDemo,CodePointIM,jfc,,CodePointIM,,,*.html)) 125 $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services: \ 126 $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar \ 127 $(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor 128 (cd $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM && \ 129 $(MKDIR) -p _the.tmp/META-INF/services && \ 130 $(CP) $(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \ 131 cd _the.tmp && \ 132 $(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \ 133 cd META-INF/services && \ 134 $(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor) 135 $(RM) -r $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.tmp 136 $(TOUCH) $@ 137 138 BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services 139 140 $(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*)) 141 $(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*)) 142 $(eval $(call SetupDemo,Notepad,jfc,,Notepad,,,README*)) 143 $(eval $(call SetupDemo,SampleTree,jfc,,SampleTree,,,README*)) 144 $(eval $(call SetupDemo,TableExample,jfc,,TableExample,,,README*)) 145 $(eval $(call SetupDemo,TransparentRuler,jfc,,transparentruler.Ruler,,,README*)) 146 $(eval $(call SetupDemo,jconsole-plugin,scripting,,,,,*.xml *.txt,,,,Main-Class: \n)) 147 $(eval $(call SetupDemo,FullThreadDump,management,,FullThreadDump,,,README*)) 148 $(eval $(call SetupDemo,JTop,management,,JTop,,,README*)) 149 $(eval $(call SetupDemo,MemoryMonitor,management,,MemoryMonitor,,,README*)) 150 $(eval $(call SetupDemo,VerboseGC,management,,VerboseGC,,,README*)) 151 $(eval $(call SetupDemo,zipfs,nio,,,,,README* *.java,,,,Main-Class: \n)) 152 153 ifndef OPENJDK 154 $(eval $(call SetupDemo,Laffy,jfc,,,,closed/,*)) 155 $(eval $(call SetupDemo,SwingSet3,jfc,,,,closed/,*)) 156 157 $(eval $(call SetupDemo,Stylepad,jfc,,Stylepad, \ 158 $(JDK_TOPDIR)/src/share/demo/jfc/Notepad,closed/,*.txt,,$(JDK_TOPDIR)/src/share/demo/jfc/Notepad/README.txt)) 159 160 BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%, \ 161 $(JDK_OUTPUTDIR)/demo/nbproject/%, \ 162 $(call CacheFind, $(JDK_TOPDIR)/src/closed/share/demo/nbproject)) 163 164 $(JDK_OUTPUTDIR)/demo/nbproject/%: $(JDK_TOPDIR)/src/closed/share/demo/nbproject/% 165 $(call install-file) 166 $(CHMOD) -f ug+w $@ 167 endif 168 169 ################################################################################################## 170 171 # In the old makefiles, j2dbench was not compiled. 172 #$(eval $(call SetupDemo,J2DBench, java2d, /src, , j2dbench/J2DBench)) 173 174 # JVMTI demos are a bit strange and share some files, but be careful the 175 # shared files are just the *.c and *.h files, not the README or sample 176 # makefiles. So we always exclude the README.txt and sample.makefile.txt 177 # from the extra sources. 178 define SetupJVMTIDemo | 39 40 # Append demo goals to this variable. 41 BUILD_DEMOS = 42 43 # The demo structure and contents should really be cleaned up. 44 # Now every other demo has its own quirks where to put the 45 # READMEs and other files. 46 47 ################################################################################################## 48 49 define SetupAppletDemo 50 $$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1, \ 51 SETUP := GENERATE_USINGJDKBYTECODE, \ 52 SRC := $(JDK_TOPDIR)/src/$3share/demo/applets/$1, \ 53 BIN := $(JDK_OUTPUTDIR)/demo/applets/$1, \ 54 COPY := .html .java .xyz .obj .au .gif, \ 55 DISABLE_SJAVAC := $2)) 56 BUILD_DEMOS += $$(BUILD_DEMO_APPLET_$1) 57 endef 58 59 ifneq ($(OPENJDK_TARGET_OS), solaris) 60 $(eval $(call SetupAppletDemo,ArcTest)) 61 $(eval $(call SetupAppletDemo,BarChart)) 62 $(eval $(call SetupAppletDemo,Blink)) 63 $(eval $(call SetupAppletDemo,CardTest)) 64 $(eval $(call SetupAppletDemo,Clock)) 65 $(eval $(call SetupAppletDemo,DitherTest)) 66 $(eval $(call SetupAppletDemo,DrawTest)) 67 $(eval $(call SetupAppletDemo,Fractal)) 68 $(eval $(call SetupAppletDemo,GraphicsTest)) 69 $(eval $(call SetupAppletDemo,NervousText)) 70 $(eval $(call SetupAppletDemo,SimpleGraph)) 71 $(eval $(call SetupAppletDemo,SortDemo)) 72 $(eval $(call SetupAppletDemo,SpreadSheet)) 73 74 ifndef OPENJDK 75 $(eval $(call SetupAppletDemo,Animator,,closed/)) 76 $(eval $(call SetupAppletDemo,GraphLayout,true,closed/)) 77 $(eval $(call SetupAppletDemo,JumpingBox,,closed/)) 78 $(eval $(call SetupAppletDemo,TicTacToe,,closed/)) 79 endif 80 endif 81 82 ################################################################################################## 83 84 PATTERNS_TO_COPY = .html .txt .properties .js .gif .jpg .theme .data .opt README .c .h .png .ttf .xyz .obj 85 86 define SetupDemo 87 # Param 1 = Name of the demo 88 # Param 2 = Subdirectory of the demo below the demo directory. 89 # Param 3 = Additional javac flags. 90 # Param 4 = The main class for the jar. 91 # Param 5 = Additional source directory. 92 # Param 6 = Extra dir below $(JDK_TOPDIR)/src (closed) 93 # Param 7 = List of files to copy 94 # Param 8 = Base name of jar file. Defaults to $1 95 # Param 9 = Exclude list 96 # Param 10 = Extra copy patterns 97 # Param 11 = Extra manifest attribute 98 # Param 12 = Suffix for compiler setup name 99 100 # In some demos the source is found in a subdir called src. 142 endif 143 144 endef 145 146 $(eval $(call SetupDemo,CodePointIM,jfc,,CodePointIM,,,*.html)) 147 $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services: \ 148 $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar \ 149 $(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor 150 (cd $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM && \ 151 $(MKDIR) -p _the.tmp/META-INF/services && \ 152 $(CP) $(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \ 153 cd _the.tmp && \ 154 $(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \ 155 cd META-INF/services && \ 156 $(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar java.awt.im.spi.InputMethodDescriptor) 157 $(RM) -r $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.tmp 158 $(TOUCH) $@ 159 160 BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services 161 162 ifneq ($(OPENJDK_TARGET_OS), solaris) 163 $(eval $(call SetupDemo,MoleculeViewer,applets,,XYZChemModel,,,example*.html *.java)) 164 $(eval $(call SetupDemo,WireFrame,applets,,ThreeD,,,example*.html *.java)) 165 $(eval $(call SetupDemo,SwingApplet,jfc,,SwingApplet,,,README* *.html)) 166 endif 167 $(eval $(call SetupDemo,FileChooserDemo,jfc,,FileChooserDemo,,,README*)) 168 $(eval $(call SetupDemo,Font2DTest,jfc,,Font2DTest,,,*.html *.txt)) 169 $(eval $(call SetupDemo,Metalworks,jfc,,Metalworks,,,README*)) 170 $(eval $(call SetupDemo,Notepad,jfc,,Notepad,,,README*)) 171 $(eval $(call SetupDemo,SampleTree,jfc,,SampleTree,,,README*)) 172 $(eval $(call SetupDemo,TableExample,jfc,,TableExample,,,README*)) 173 $(eval $(call SetupDemo,TransparentRuler,jfc,,transparentruler.Ruler,,,README*)) 174 $(eval $(call SetupDemo,jconsole-plugin,scripting,,,,,*.xml *.txt,,,,Main-Class: \n)) 175 $(eval $(call SetupDemo,FullThreadDump,management,,FullThreadDump,,,README*)) 176 $(eval $(call SetupDemo,JTop,management,,JTop,,,README*)) 177 $(eval $(call SetupDemo,MemoryMonitor,management,,MemoryMonitor,,,README*)) 178 $(eval $(call SetupDemo,VerboseGC,management,,VerboseGC,,,README*)) 179 $(eval $(call SetupDemo,zipfs,nio,,,,,README* *.java,,,,Main-Class: \n)) 180 181 ifndef OPENJDK 182 $(eval $(call SetupDemo,Laffy,jfc,,,,closed/,*)) 183 $(eval $(call SetupDemo,SwingSet3,jfc,,,,closed/,*)) 184 185 $(eval $(call SetupDemo,Java2D,jfc,,java2d.Java2Demo,,closed/,*.html README*,Java2Demo)) 186 $(eval $(call SetupDemo,Stylepad,jfc,,Stylepad, \ 187 $(JDK_TOPDIR)/src/share/demo/jfc/Notepad,closed/,*.txt,,$(JDK_TOPDIR)/src/share/demo/jfc/Notepad/README.txt)) 188 $(eval $(call SetupDemo,SwingSet2,jfc,,SwingSet2,,closed/,README* *.html,,,.java COPYRIGHT, \ 189 SplashScreen-Image: resources/images/splash.png,true)) 190 191 BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%, \ 192 $(JDK_OUTPUTDIR)/demo/nbproject/%, \ 193 $(call CacheFind, $(JDK_TOPDIR)/src/closed/share/demo/nbproject)) 194 195 $(JDK_OUTPUTDIR)/demo/nbproject/%: $(JDK_TOPDIR)/src/closed/share/demo/nbproject/% 196 $(call install-file) 197 $(CHMOD) -f ug+w $@ 198 endif 199 200 ################################################################################################## 201 202 # In the old makefiles, j2dbench was not compiled. 203 #$(eval $(call SetupDemo,J2DBench, java2d, /src, , j2dbench/J2DBench)) 204 205 # JVMTI demos are a bit strange and share some files, but be careful the 206 # shared files are just the *.c and *.h files, not the README or sample 207 # makefiles. So we always exclude the README.txt and sample.makefile.txt 208 # from the extra sources. 209 define SetupJVMTIDemo |