forked from gavin/bc
1
0
Fork 0
Browse Source

Add the new manpage stuff to the build system

master
Gavin Howard 2 years ago
parent
commit
985d85c2ee
Signed by untrusted user who does not match committer: gavin
GPG Key ID: C08038BDF280D33E
  1. 6
      .gitignore
  2. 9
      Makefile.in
  3. 29
      configure.sh

6
.gitignore vendored

@ -17,6 +17,12 @@ bc.old
.math.txt
.results.txt
.ops.txt
manuals/bc.1
manuals/bc.1.ronn
manuals/bc.1.md
manuals/dc.1
manuals/dc.1.ronn
manuals/dc.1.md
gen/strgen
lib.c
lib2.c

9
Makefile.in

@ -106,9 +106,11 @@ MANUALS = manuals
BC_MANPAGE_NAME = $(EXEC_PREFIX)$(BC)$(EXEC_SUFFIX).1
BC_MANPAGE = $(MANUALS)/$(BC).1
BC_RONN = $(BC_MANPAGE).ronn
BC_MD = $(BC_MANPAGE).md
DC_MANPAGE_NAME = $(EXEC_PREFIX)$(DC)$(EXEC_SUFFIX).1
DC_MANPAGE = $(MANUALS)/$(DC).1
DC_RONN = $(DC_MANPAGE).ronn
DC_MD = $(DC_MANPAGE).md
MANPAGE_INSTALL_ARGS = -Dm644
@ -270,8 +272,8 @@ extra_math:
@printf '%s' "$(BC_ENABLE_EXTRA_MATH)"
manpages:
$(MANPAGE) $(BC_RONN) $(BC_MANPAGE)
$(MANPAGE) $(DC_RONN) $(DC_MANPAGE)
$(MANPAGE) bc
$(MANPAGE) dc
clean_gen:
@$(RM) -f $(GEN_EXEC)
@ -295,6 +297,9 @@ clean:%%CLEAN_PREREQS%%
clean_config: clean
@printf 'Cleaning config...\n'
@$(RM) -f Makefile
@$(RM) -f $(BC_RONN) $(DC_RONN)
@$(RM) -f $(BC_MD) $(DC_MD)
@$(RM) -f $(BC_MANPAGE) $(DC_MANPAGE)
clean_coverage:
@printf 'Cleaning coverage files...\n'

29
configure.sh

@ -808,6 +808,28 @@ else
fi
fi
manpage_args=""
if [ "$extra_math" -eq 0 ]; then
manpage_args="E"
fi
if [ "$hist" -eq 0 ]; then
manpage_args="${manpage_args}H"
fi
if [ "$nls" -eq 0 ]; then
manpage_args="${manpage_args}N"
fi
if [ "$prompt" -eq 0 ]; then
manpage_args="${manpage_args}P"
fi
if [ "$manpage_args" = "" ]; then
manpage_args="A"
fi
# Print out the values; this is for debugging.
if [ "$bc" -ne 0 ]; then
printf 'Building bc\n'
@ -924,4 +946,11 @@ printf '%s\n' "$contents" > "$scriptdir/Makefile"
cd "$scriptdir"
cp -f manuals/bc/$manpage_args.1.ronn manuals/bc.1.ronn
cp -f manuals/bc/$manpage_args.1.ronn manuals/bc.1.md
cp -f manuals/bc/$manpage_args.1 manuals/bc.1
cp -f manuals/dc/$manpage_args.1.ronn manuals/dc.1.ronn
cp -f manuals/dc/$manpage_args.1.ronn manuals/dc.1.md
cp -f manuals/dc/$manpage_args.1 manuals/dc.1
make clean > /dev/null

Loading…
Cancel
Save