4 # (c) Drotos Daniel, Talker Bt. 1997,99
12 PKGS = cmd.src sim.src gui.src s51.src avr.src z80.src doc
17 # Compiling entire program or any subproject
18 # ------------------------------------------
20 $(MAKE) -f main.mk all
21 @for pkg in $(PKGS); do\
22 cd $$pkg && $(MAKE) $$pkg ; cd ..;\
26 $(MAKE) -f main.mk libs
29 # Compiling and installing everything and runing test
30 # ---------------------------------------------------
31 .PHONY: install INSTALL Install
33 $(MAKE) -f main.mk install
34 @for pkg in $(PKGS); do\
35 $(MAKE) -C $$pkg install ;\
39 # Deleting all the installed files
40 # --------------------------------
42 $(MAKE) -f main.mk uninstall
43 @for pkg in $(PKGS); do\
44 $(MAKE) -C $$pkg uninstall ;\
48 # Deleting all files created by building the program
49 # --------------------------------------------------
51 $(MAKE) -f clean.mk clean
52 @for pkg in $(PKGS); do\
53 $(MAKE) -C $$pkg -f clean.mk clean ;\
57 # Deleting all files created by configuring or building the program
58 # -----------------------------------------------------------------
60 $(MAKE) -f clean.mk distclean
61 @for pkg in $(PKGS); do\
62 $(MAKE) -C $$pkg -f clean.mk distclean ;\
64 rm -rf doc/*~ doc/*.bak
67 # Like clean but some files may still exist
68 # -----------------------------------------
70 $(MAKE) -f clean.mk mostlyclean
71 @for pkg in $(PKGS); do\
72 $(MAKE) -C $$pkg -f clean.mk mostlyclean ;\
76 # Deleting everything that can reconstructed by this Makefile. It deletes
77 # everything deleted by distclean plus files created by bison, stc.
78 # -----------------------------------------------------------------------
80 $(MAKE) -f clean.mk realclean
81 @for pkg in $(PKGS); do\
82 $(MAKE) -C $$pkg -f clean.mk realclean ;\
86 # Creating distribution
87 # ---------------------
89 @if [ -f devel ]; then\
90 rm -f devel; mkdist ucsim; touch devel;\
96 # Performing self-test
97 # --------------------
101 # Performing installation test
102 # ----------------------------
106 # Creating dependencies
107 # ---------------------
109 $(MAKE) -f main.mk dep
110 @for pkg in $(PKGS); do\
111 $(MAKE) -C $$pkg dep ;\
118 'put(c)' -s $(STARTYEAR) *.cc *.h *.y *.l
121 date '+%Y.%m.%d-%H:%M' >.start
124 @if [ -f .start ]; then \
126 `find . -newer .start -type f -print` |\
127 gzip -9c >ucsim-newer-`cat .start`_`date '+%Y.%m.%d-%H:%M'`_`hostname`.tgz; \
129 echo ".start file not found.\n"; \
134 @if [ -f .start ]; then \
135 find . -newer .start -type f -print ;\
137 echo ".start file not found.\n" ;\
142 diff -rNu $$HOME/clean-source/sdcc/sim/ucsim .|\
143 grep '^diff' | grep -v CVS | awk '{print $$4}'
146 @find . \( -name '*.[ch]' -o -name '*.cc' -o -name '*.hh' \) \
147 -exec cat {} \; | clines
150 # Remaking configuration
151 # ----------------------
152 configure: configure.in
153 @echo "RE-CREATING CONFIGURE"
154 $(SHELL) autoconf configure.in >configure
157 config.status: configure
158 @echo "RE-CHECKING CONFIGURATION"
159 ./config.status -recheck
161 makefiles: config.status
162 @echo "RE-MAKING MAKEFILES"
163 $(SHELL) ./config.status
165 main.mk: $(srcdir)/main_in.mk $(srcdir)/configure.in
166 @echo "RE-MAKING MAIN.MK"
167 $(SHELL) ./config.status
169 freshconf: echo_freshconf configure main.mk
176 @if [ -f devel ]; then $(MAKE) freshconf; fi