Debian Codegraph @

ivette/src/dome/examples/Makefile

raw
1 ##########################################################################
2 # #
3 # This file is part of Frama-C. #
4 # #
5 # Copyright (C) 2007-2022 #
6 # CEA (Commissariat à l'énergie atomique et aux énergies #
7 # alternatives) #
8 # #
9 # you can redistribute it and/or modify it under the terms of the GNU #
10 # Lesser General Public License as published by the Free Software #
11 # Foundation, version 2.1. #
12 # #
13 # It is distributed in the hope that it will be useful, #
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
16 # GNU Lesser General Public License for more details. #
17 # #
18 # See the GNU Lesser General Public License version 2.1 #
19 # for more details (enclosed in the file licenses/LGPLv2.1). #
20 # #
21 ##########################################################################
22
23 # --------------------------------------------------------------------------
24 help:
25 @echo "*****************************************"
26 @echo "*** Dome Framework Makefile ***"
27 @echo "*****************************************"
28 @echo
29 @echo " make doc: alias for dome-doc"
30 @echo " make dev: alias for dome-dev"
31 @echo " make app: alias for dome-app"
32 @echo " make dist: alias for dome-dist"
33 @echo " make dome-help: detailed help for dome"
34 @echo " make DEMO=<xxx> demo: switch to 'src/renderer/demo/xxx.js' "
35 @echo
36 @echo "*****************************************"
37
38 # --------------------------------------------------------------------------
39
40 APP=Dome
41 DOME=.
42 DEMO=Hello
43
44 include $(DOME)/template/makefile
45
46 .PHONY: doc demo dev app dist
47
48 doc: dome-doc
49 dev: dome-dev
50 app: dome-app
51 dist: dome-dist
52
53 demo: src/renderer/demo/$(DEMO).js
54 @echo "Switch to src/renderer/demo/$(DEMO).js"
55 @rm -f src/renderer/Application.js
56 @echo "// Dome Demonstrator" >> src/renderer/Application.js
57 @echo "import React from 'react' ;" >> src/renderer/Application.js
58 @echo "import Main from './demo/$(DEMO).js' ;" >> src/renderer/Application.js
59 @echo "export default (() => <Main/>);" >> src/renderer/Application.js
60
61 src/renderer/demo/%.js:
62 @echo "Generate $@"
63 @echo "// Dome Demonstrator" > $@
64 @echo "import React from 'react';" >> $@
65 @echo "export default (() => <h1>$* Demo</h1>);" >> $@
66
67 # --------------------------------------------------------------------------