From f1e182de803414790fb6bc442a38311bb58b7405 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Sun, 8 Oct 2023 22:07:16 +0100 Subject: [PATCH 1/3] Add "Filesystem" and "Launcher" to git ignore file --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 33c55b1..515c7b3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,9 @@ *.o Makefile +/Filesystem /Keyboard +/Launcher /Xinitrc /Xsession /Xsession2 From a010c4406f62a10a6311f796645fecf72db11848 Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Sun, 8 Oct 2023 22:09:51 +0100 Subject: [PATCH 2/3] Drop obsolete smakefile This appears to be for the ye olde SAS/C compiler! It wouldn't work now, even if you did have that. --- Makefile.in | 2 +- smakefile | 47 ----------------------------------------------- 2 files changed, 1 insertion(+), 48 deletions(-) delete mode 100644 smakefile diff --git a/Makefile.in b/Makefile.in index 70dadc0..67ec708 100644 --- a/Makefile.in +++ b/Makefile.in @@ -38,7 +38,7 @@ SRCS = main.c screen.c client.c frame.c icc.c \ config_util.c launchermodule.c DISTFILES = README.md MODULES.md INSTALL LICENSE amiwm.1 \ - configure configure.ac Makefile.in install-sh smakefile scoptions \ + configure configure.ac Makefile.in install-sh \ *.[chly] system.amiwmrc.in def_*.info *.map \ Background Background_resize Background_resize_norepeat \ Background_stretch Launcher Xresources.amiwm.in Amilogo.?m \ diff --git a/smakefile b/smakefile deleted file mode 100644 index b53e0c2..0000000 --- a/smakefile +++ /dev/null @@ -1,47 +0,0 @@ - -PROGRAMS = amiwm requestchoice - -AMIWM_HOME = amiwm: - -SRCS1 = main.c drawinfo.c client.c frame.c icc.c \ - icon.c menu.c diskobject.c gram.c lex.c rc.c -OBJS1 = main.o drawinfo.o client.o frame.o icc.o \ - icon.o menu.o diskobject.o gram.o lex.o rc.o - -SRCS2 = requestchoice.c drawinfo.c -OBJS2 = requestchoice.o drawinfo.o - - -all : $(PROGRAMS) - -amiwm : $(OBJS1) - sc LINK PNAME amiwm $(OBJS1) - -requestchoice : $(OBJS2) - sc LINK PNAME requestchoice $(OBJS2) - -gram.c : gram.y - bison -y -d -o gram.c gram.y - -lex.c : lex.l - flex -t < lex.l > lex.c - -gram.o : gram.c - -lex.o : lex.c - -menu.o : menu.c - sc menu DEF AMIWM_HOME="$(AMIWM_HOME)" - -rc.o : rc.c - sc rc DEF AMIWM_HOME="$(AMIWM_HOME)" - -clean : tidy - -delete FORCE $(PROGRAMS) - -tidy : - -delete FORCE \#?.(o|q|tmp|lnk) lex.c gram.c gram.h core - -install : - copy amiwm requestchoice system.amiwmrc def_tool.info $(AMIWM_HOME) - From 582349299270ca2176e677ad0de126e78e972eec Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Sun, 8 Oct 2023 22:11:52 +0100 Subject: [PATCH 3/3] Adjust yacc builds to support the original yacc (as opposed to bison) yacc doesn't support the arguments we've been giving to bison. byacc was also tested. --- .gitignore | 8 ++++---- Makefile.in | 26 +++++++++++++------------- kbdlexer.l | 2 +- lex.l | 2 +- rc.c | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 515c7b3..7c6c6b4 100644 --- a/.gitignore +++ b/.gitignore @@ -15,11 +15,11 @@ Makefile /config_util /configure /executecmd -/gram.c -/gram.h +/gram.tab.c +/gram.tab.h /kbdlexer.c -/kbdmodule.c -/kbdmodule.h +/kbdmodule.tab.c +/kbdmodule.tab.h /lex.c /ppmtoinfo /requestchoice diff --git a/Makefile.in b/Makefile.in index 67ec708..3ba7155 100644 --- a/Makefile.in +++ b/Makefile.in @@ -28,13 +28,13 @@ MODULES = Background Keyboard Background_resize Background_stretch \ def_tool.info Filesystem Launcher OBJS = main.o screen.o client.o frame.o icc.o \ - icon.o menu.o diskobject.o gram.o lex.o rc.o \ + icon.o menu.o diskobject.o gram.tab.o lex.o rc.o \ module.o SRCS = main.c screen.c client.c frame.c icc.c \ - icon.c menu.c diskobject.c gram.c lex.c rc.c \ + icon.c menu.c diskobject.c gram.tab.c lex.c rc.c \ module.c \ - requestchoice.c executecmd.c kbdmodule.c kbdlexer.c \ + requestchoice.c executecmd.c kbdmodule.tab.c kbdlexer.c \ config_util.c launchermodule.c DISTFILES = README.md MODULES.md INSTALL LICENSE amiwm.1 \ @@ -66,7 +66,7 @@ lib_clean: menu.o: menu.c $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $< -rc.o: rc.c gram.h +rc.o: rc.c gram.tab.h $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $< diskobject.o: diskobject.c @@ -78,18 +78,18 @@ filesystem.o: joke_fs.c ppmtoinfo.o: ppmtoinfo.c $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -DAMIWM_HOME=\"$(AMIWM_HOME)\" $< -gram.h gram.c: gram.y - $(YACC) --defines=gram.h --output=gram.c $< +%.tab.c %.tab.h: %.y + $(YACC) -b $* -d $< lex.c: lex.l $(LEX) -t $< > lex.c -kbdmodule.h kbdmodule.c: kbdmodule.y - $(YACC) --defines=kbdmodule.h --output=kbdmodule.c $< - kbdlexer.c: kbdlexer.l $(LEX) -t $< > kbdlexer.c +lex.o: gram.tab.h +kbdlexer.o: kbdmodule.tab.h + install: $(PROGS) $(MODULES) system.amiwmrc Xsession Xsession2 Xinitrc amiwm-init -mkdir -p $(DESTDIR)$(AMIWM_HOME) -mkdir -p $(DESTDIR)$(AMIWM_MODULES) @@ -163,8 +163,8 @@ executecmd: executecmd.o $(LIBAMI) Filesystem: filesystem.o $(LIBAMI) $(CC) $(LDFLAGS) -o Filesystem filesystem.o $(LIBS) -Keyboard: kbdmodule.o kbdlexer.o $(LIBAMI) - $(CC) $(LDFLAGS) -o Keyboard kbdmodule.o kbdlexer.o $(LIBS) +Keyboard: kbdmodule.tab.o kbdlexer.o $(LIBAMI) + $(CC) $(LDFLAGS) -o Keyboard kbdmodule.tab.o kbdlexer.o $(LIBS) Battery: battery_module.o $(LIBAMI) $(CC) $(LDFLAGS) -o Battery battery_module.o $(LIBS) @@ -180,8 +180,8 @@ localetest: localetest.o $(LIBAMI) clean: lib_clean $(RM) core $(PROGS) $(LIBAMI) Keyboard Battery Launcher *.o - $(RM) lex.yy.c lex.c y.tab.c y.tab.h gram.h gram.c - $(RM) kbdlexer.c kbdmodule.h kbdmodule.c + $(RM) lex.yy.c lex.c gram.tab.h gram.tab.c + $(RM) kbdlexer.c kbdmodule.tab.h kbdmodule.tab.c $(RM) config.log distclean: clean diff --git a/kbdlexer.l b/kbdlexer.l index f69a0a6..1c7f152 100644 --- a/kbdlexer.l +++ b/kbdlexer.l @@ -4,7 +4,7 @@ #include #include "libami.h" -#include "kbdmodule.h" +#include "kbdmodule.tab.h" unsigned char *inptr; extern char *progname; diff --git a/lex.l b/lex.l index fc912d4..21248b4 100644 --- a/lex.l +++ b/lex.l @@ -1,7 +1,7 @@ %option noyywrap %{ #include -#include "gram.h" +#include "gram.tab.h" extern char *progname; extern int ParseError; extern FILE *rcfile; diff --git a/rc.c b/rc.c index 64846f6..fb7d7c9 100644 --- a/rc.c +++ b/rc.c @@ -7,7 +7,7 @@ #include "prefs.h" #include "drawinfo.h" #include "screen.h" -#include "gram.h" +#include "gram.tab.h" #include "icc.h" #include "style.h"