Skip to content

Commit

Permalink
Adjust Makefiles to match those in our other repos
Browse files Browse the repository at this point in the history
by filling out the top Makefile (including adding an install-doc target)
and changing the realclean target everywhere to full_clean
  • Loading branch information
quark17 committed Mar 22, 2021
1 parent d94459d commit 00178ac
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 37 deletions.
35 changes: 30 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,34 @@ PREFIX?=$(TOP)/inst
.PHONY: all
all: install

$(PREFIX):
mkdir -p $@
# -------------------------

.PHONY: install clean realclean
install clean realclean: $(PREFIX)
make -C src PREFIX=$(PREFIX) $@
.PHONY: rem_inst
rem_inst:
rm -fr $(PREFIX)

.PHONY: rem_build
rem_build:
rm -fr $(BUILDDIR)

# -------------------------

.PHONY: install
install:
$(MAKE) -C src PREFIX=$(PREFIX) install

.PHONY: install-doc
install-doc:
$(MAKE) -C doc PREFIX=$(PREFIX) install

# -------------------------

clean: rem_inst rem_build
-$(MAKE) -C src clean
-$(MAKE) -C doc clean

full_clean: rem_inst rem_build
-$(MAKE) -C src full_clean
-$(MAKE) -C doc full_clean

# -------------------------
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ For viewing scheduling graphs visually:

You can install with:

$ make
$ make install

And then you can run with:

Expand All @@ -112,10 +112,9 @@ And then you can run with:
## Documenation

The `doc` directory contains a User Guide written in LaTeX.
You can build `user_guide.pdf` with:
You can build and install the `user_guide.pdf` with:

$ cd doc/
$ make
$ make install-doc

This requires LaTex tools, such as `pdflatex`.

Expand Down
4 changes: 2 additions & 2 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ INCLUDES = \
version.tex \
bluetcl.tex \

.PHONY: doc clean realclean
.PHONY: doc clean full_clean

doc: $(DOC).pdf

clean:
${RM} -f *.dvi *.ps *.pdf figures/*.pdf

realclean: clean
full_clean: clean
${RM} -f *.log *.aux *.blg *.bbl *.toc *.out *.idx *.ind *.ilg user_guide.cdx user_guide.cnd

$(DOC).dvi: $(DOC).tex
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ all: install
$(PREFIX):
mkdir -p $@

.PHONY: install clean realclean
install clean realclean: $(PREFIX)
.PHONY: install clean full_clean
install clean full_clean: $(PREFIX)
make -C emacs PREFIX=$(PREFIX) $@
make -C exec PREFIX=$(PREFIX) $@
make -C gvim PREFIX=$(PREFIX) $@
Expand Down
4 changes: 2 additions & 2 deletions src/emacs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ install:
install -d -m755 $(TARGETDIR)
install -m644 $(FILES) $(TARGETDIR)

.PHONY: clean realclean
realclean: clean
.PHONY: clean full_clean
full_clean: clean

clean:
4 changes: 2 additions & 2 deletions src/exec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ install:
install -d -m755 $(TARGETDIR)
install -m755 fixvcd.pl $(TARGETDIR)/fixvcd

.PHONY: clean realclean
realclean: clean
.PHONY: clean full_clean
full_clean: clean

clean:
4 changes: 2 additions & 2 deletions src/gvim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ install:
install -d -m755 $(TARGETDIR)
install -m644 $(FILES) $(TARGETDIR)

.PHONY: clean realclean
realclean: clean
.PHONY: clean full_clean
full_clean: clean

clean:
4 changes: 2 additions & 2 deletions src/iwidgets4.0.1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ install:
$(MAKE) -C $(dir) LIBDIR=$(abspath $(TARGETDIR)/$(dir)) $@ ; )


.PHONY: clean realclean
clean realclean:
.PHONY: clean full_clean
clean full_clean:

4 changes: 2 additions & 2 deletions src/iwidgets4.0.1/generic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ install:
$(INSTALL) -m 644 $(FILES) $(LIBDIR)


.PHONY: clean realclean
clean realclean:
.PHONY: clean full_clean
clean full_clean:

4 changes: 2 additions & 2 deletions src/novas/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ install:
TAGS: */*.tcl
ctags -R -e

.PHONY: clean realclean
realclean clean:
.PHONY: clean full_clean
full_clean clean:
rm -f TAGS
make -C etc $@
4 changes: 2 additions & 2 deletions src/novas/etc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ install: tclIndex
.PHONY: TAGS
TAGS: ../TAGS

.PHONY: clean realclean
realclean: clean
.PHONY: clean full_clean
full_clean: clean

clean:
@-rm -f tclIndex pkg_mkIndex.tcl pkgIndex.tcl
4 changes: 2 additions & 2 deletions src/novas/etc/wave/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ install:
.PHONY: TAGS
TAGS: ../TAGS

.PHONY: clean realclean
realclean: clean
.PHONY: clean full_clean
full_clean: clean

clean:
4 changes: 2 additions & 2 deletions src/tk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ install: tclIndex
install -m644 tclIndex $(TCLFILES) $(TARGETDIR)


.PHONY: clean realclean
realclean: clean
.PHONY: clean full_clean
full_clean: clean

clean:
rm -f pkgIndex.tcl tclIndex
4 changes: 2 additions & 2 deletions src/util/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ TAGS:
make -C .. TAGS
ln -s ../TAGS

.PHONY: clean realclean
realclean: clean
.PHONY: clean full_clean
full_clean: clean
-rm -f TAGS

clean:
Expand Down
4 changes: 2 additions & 2 deletions src/workstation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ TAGS: *.tcl
tags: *.tcl
ctags $+

.PHONY: clean realclean clean-tix
clean realclean: clean-tix
.PHONY: clean full_clean clean-tix
clean full_clean: clean-tix
@rm -rf tclIndex pkgIndex.tcl version_commands.tcl logs help TAGS tags

clean-tix:
Expand Down
4 changes: 2 additions & 2 deletions src/workstation/images/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ install:
install -d -m755 $(TARGETDIR)
install -m644 $(IMAGEFILES) $(TARGETDIR)

.PHONY: clean realclean
realclean: clean
.PHONY: clean full_clean
full_clean: clean

clean:

0 comments on commit 00178ac

Please sign in to comment.