4 # (c) Drotos Daniel, Talker Bt. 1997,99
12 #PKGS = cmd.src sim.src gui.src s51.src avr.src z80.src doc
17 top_builddir = @top_builddir@
18 top_srcdir = @top_srcdir@
20 # Compiling entire program or any subproject
21 # ------------------------------------------
23 $(MAKE) -f main.mk all
24 @for pkg in $(PKGS); do\
25 $(MAKE) -C $$pkg $$pkg ;\
27 $(MAKE) -f main.mk main_app
30 $(MAKE) -f main.mk libs
33 # Compiling and installing everything and runing test
34 # ---------------------------------------------------
35 .PHONY: install INSTALL Install
37 $(MAKE) -f main.mk install
38 @for pkg in $(PKGS); do\
39 $(MAKE) -C $$pkg install ;\
43 # Deleting all the installed files
44 # --------------------------------
46 $(MAKE) -f main.mk uninstall
47 @for pkg in $(PKGS); do\
48 $(MAKE) -C $$pkg uninstall ;\
52 # Deleting all files created by building the program
53 # --------------------------------------------------
55 $(MAKE) -f $(srcdir)/clean.mk clean EXEEXT=$(EXEEXT)
56 @for pkg in $(PKGS_ALL); do\
57 $(MAKE) -C $$pkg -f ../$(srcdir)/$$pkg/clean.mk clean EXEEXT=$(EXEEXT) ;\
61 # Deleting all files created by configuring or building the program
62 # -----------------------------------------------------------------
64 $(MAKE) -f $(srcdir)/clean.mk distclean
65 @for pkg in $(PKGS_ALL); do\
66 $(MAKE) -C $$pkg -f ../$(srcdir)/$$pkg/clean.mk distclean ;\
68 rm -rf doc/*~ doc/*.bak Makefile packages.mk libtool
71 # Like clean but some files may still exist
72 # -----------------------------------------
74 $(MAKE) -f clean.mk mostlyclean
75 @for pkg in $(PKGS_ALL); do\
76 $(MAKE) -C $$pkg -f ../$(srcdir)/$$pkg/clean.mk mostlyclean ;\
80 # Deleting everything that can reconstructed by this Makefile. It deletes
81 # everything deleted by distclean plus files created by bison, stc.
82 # -----------------------------------------------------------------------
84 $(MAKE) -f clean.mk realclean
85 @for pkg in $(PKGS_ALL); do\
86 $(MAKE) -C $$pkg -f ../$(srcdir)/$$pkg/clean.mk realclean ;\
90 # Creating distribution
91 # ---------------------
93 @if [ -f devel ]; then\
94 rm -f devel; mkdist; touch devel;\
100 # Performing self-test
101 # --------------------
103 $(MAKE) -f main.mk check
104 @for pkg in $(PKGS); do\
105 $(MAKE) -C $$pkg check ;\
109 $(MAKE) -f main.mk test
110 @for pkg in $(PKGS); do\
111 $(MAKE) -C $$pkg test ;\
115 # Performing installation test
116 # ----------------------------
120 # Creating dependencies
121 # ---------------------
123 $(MAKE) -f main.mk dep
124 @for pkg in $(PKGS); do\
125 $(MAKE) -C $$pkg dep ;\
132 'put(c)' -s $(STARTYEAR) *.cc *.h *.y *.l
135 date '+%Y.%m.%d-%H:%M' >.start
138 @if [ -f .start ]; then \
140 `find . -newer .start -type f -print` |\
141 gzip -9c >ucsim-newer-`cat .start`_`date '+%Y.%m.%d-%H:%M'`_`hostname`.tgz; \
143 echo ".start file not found.\n"; \
148 @if [ -f .start ]; then \
149 find . -newer .start -type f -print ;\
151 echo ".start file not found.\n" ;\
156 diff -rNu $$HOME/clean-source/sdcc/sim/ucsim .|\
157 grep '^diff' | grep -v .svn | awk '{print $$4}'
160 @find . \( -name '*.[ch]' -o -name '*.cc' -o -name '*.hh' \) \
161 -exec cat {} \; | clines
164 # Remaking configuration
165 # ----------------------
166 configure: configure.in
167 @$(top_srcdir)/mkecho $(top_builddir) "RE-CREATING CONFIGURE"
168 autoconf configure.in >configure
171 config.status: configure
172 @$(top_srcdir)/mkecho $(top_builddir) "RE-CHECKING CONFIGURATION (re-creating config.status from configure)"
173 @if [ -x ./config.status ]; then \
174 ./config.status -recheck;\
176 if [ -x ./conf ]; then\
183 makefiles: config.status
184 @$(top_srcdir)/mkecho $(top_builddir) "RE-MAKING MAKEFILES"
185 $(SHELL) ./config.status
187 main.mk: $(srcdir)/main_in.mk config.status
188 @$(top_srcdir)/mkecho $(top_builddir) "RE-MAKING MAIN.MK"
189 $(SHELL) ./config.status
191 freshconf: echo_freshconf configure main.mk ddconfig.h
193 ddconfig.h: ddconfig_in.h config.status
194 $(SHELL) ./config.status
197 @$(top_srcdir)/mkecho $(top_builddir) "FRESHCONF"
200 @$(top_srcdir)/mkecho $(top_builddir) "CHECKCONF"
201 @if [ -f devel ]; then $(MAKE) freshconf; fi