SHELL = /bin/sh
PRJDIR = .
-PKGS = cmd.src sim.src s51.src avr.src z80.src gui.src doc
+PKGS = cmd.src sim.src gui.src s51.src avr.src z80.src doc
srcdir = .
# Compiling entire program or any subproject
# ------------------------------------------
-all: main.mk
+all: checkconf
$(MAKE) -f main.mk all
@for pkg in $(PKGS); do\
cd $$pkg && $(MAKE) $$pkg ; cd ..;\
done
+ $(MAKE) -f main.mk main_app
libs: main.mk
$(MAKE) -f main.mk libs
# Compiling and installing everything and runing test
# ---------------------------------------------------
+.PHONY: install INSTALL Install
install:
$(MAKE) -f main.mk install
@for pkg in $(PKGS); do\
putcopyright:
'put(c)' -s $(STARTYEAR) *.cc *.h *.y *.l
+start:
+ date '+%Y.%m.%d-%H:%M' >.start
+
newer: distclean
- @if [ -f start ]; then \
+ @if [ -f .start ]; then \
tar cvf - \
- `find . -newer start -type f -print` |\
- gzip -9c >ucsim-newer-`date '+%Y.%m.%d-%H:%M'`.tgz; \
+ `find . -newer .start -type f -print` |\
+ gzip -9c >ucsim-newer-`cat .start`_`date '+%Y.%m.%d-%H:%M'`_`hostname`.tgz; \
else \
- echo "start file not found.\n"; \
+ echo ".start file not found.\n"; \
exit 1; \
fi
print-newer:
- @if [ -f start ]; then \
- find . -newer start -type f -print ;\
+ @if [ -f .start ]; then \
+ find . -newer .start -type f -print ;\
else \
- echo "start file not found.\n" ;\
+ echo ".start file not found.\n" ;\
exit 1 ;\
fi
+new_files:
+ diff -rNu $$HOME/clean-source/sdcc/sim/ucsim .|\
+ grep '^diff' | grep -v CVS | awk '{print $$4}'
+
lines:
@find . \( -name '*.[ch]' -o -name '*.cc' -o -name '*.hh' \) \
-exec cat {} \; | clines
# Remaking configuration
# ----------------------
configure: configure.in
- $(SHELL) autoconf
-
-main.mk: $(srcdir)/main_in.mk $(srcdir)/configure.in config.status
- $(SHELL) ./config.status
+ @echo "RE-CREATING CONFIGURE"
+ $(SHELL) autoconf configure.in >configure
+ chmod 755 configure
config.status: configure
- $(SHELL) ./config.status --recheck
+ @echo "RE-CHECKING CONFIGURATION"
+ ./config.status -recheck
-makefiles:
+makefiles: config.status
+ @echo "RE-MAKING MAKEFILES"
$(SHELL) ./config.status
-freshconf: main.mk
+main.mk: $(srcdir)/main_in.mk $(srcdir)/configure.in
+ @echo "RE-MAKING MAIN.MK"
+ $(SHELL) ./config.status
+
+freshconf: echo_freshconf configure main.mk
+
+echo_freshconf:
+ @echo "FRESHCONF"
checkconf:
- @if [ -f devel ]; then\
- $(MAKE) freshconf;\
- fi
+ @echo "CHECKCONF"
+ @if [ -f devel ]; then $(MAKE) freshconf; fi
# End of Makefile