diff options
| author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-29 20:07:38 +0000 |
|---|---|---|
| committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-29 20:07:38 +0000 |
| commit | d6bb55476c9aa4771e2b7f24cee05325a1df4117 (patch) | |
| tree | ed830d3c2c748f4c1ed6de25922461d701a805de /lang | |
| parent | 0bb13ddf57c968db37a997851650d768641b3528 (diff) | |
Revived Autotools from the grave, although it'll need some tweaking to work alongside CMake now. (In other words, don't use this commit, I committed this so I don't have to re-add these files again if I screw something up.)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1876 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'lang')
| -rw-r--r-- | lang/Makefile | 82 | ||||
| -rw-r--r-- | lang/Makefile.win32 | 75 |
2 files changed, 157 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile new file mode 100644 index 000000000..2a012be32 --- /dev/null +++ b/lang/Makefile @@ -0,0 +1,82 @@ +# Makefile for language module + +MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \ + 'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \ + 'INCLUDEDIR=${INCLUDEDIR}' 'RM=${RM}' 'CP=${CP}' \ + 'TOUCH=${TOUCH}' 'SHELL=${SHELL}' 'DATDEST=${DATDEST}' \ + 'RUNGROUP=${RUNGROUP}' 'MAKEBIN=${MAKEBIN}' + +LANGOBJS = cat de en_us es fr gr hun it nl pl pt ru tr +LANGSRCS = cat.l de.l en_us.l es.l fr.l gr.l hun.l it.l nl.l pl.l pt.l ru.l tr.l + +LANGCOMP = ./langcomp +#LANGCOMP = ./langcomp -w + + +all: $(LANGOBJS) + +distclean: clean spotless + +install: all + test -d $(DATDEST)/languages || mkdir $(DATDEST)/languages + @if [ "$(RUNGROUP)" ] ; then \ + echo chgrp -R $(RUNGROUP) $(DATDEST)/languages ; \ + chgrp -R $(RUNGROUP) $(DATDEST)/languages ; \ + echo chmod -R g+rw $(DATDEST)/languages ; \ + chmod -R g+rw $(DATDEST)/languages ; \ + $(CP) $(LANGOBJS) $(DATDEST)/languages ; \ + echo chgrp -R $(RUNGROUP) $(DATDEST)/languages ; \ + chgrp -R $(RUNGROUP) $(DATDEST)/languages/* ; \ + echo chmod -R g+rw $(DATDEST)/languages/* ; \ + chmod -R g+rw $(DATDEST)/languages/* ; \ + fi + @if [ ! "$(RUNGROUP)" ] ; then \ + chmod 700 $(DATDEST)/languages/ ; \ + $(CP) $(LANGOBJS) $(DATDEST)/languages ; \ + chmod 600 $(DATDEST)/languages/* ; \ + fi + +clean: + rm -f $(LANGOBJS) langcomp language.h + +spotless: clean + rm -f index + + +cat: cat.l langcomp index + @./langcomp $@.l +de: de.l langcomp index + @./langcomp $@.l +en_us: en_us.l langcomp index + @./langcomp $@.l +es: es.l langcomp index + @./langcomp $@.l +fr: fr.l langcomp index + @./langcomp $@.l +gr: gr.l langcomp index + @./langcomp $@.l +hun: hun.l langcomp index + @./langcomp $@.l +it: it.l langcomp index + @./langcomp $@.l +nl: nl.l langcomp index + @./langcomp $@.l +pl: pl.l langcomp index + @./langcomp $@.l +pt: pt.l langcomp index + @./langcomp $@.l +ru: ru.l langcomp index + @./langcomp $@.l +tr: tr.l langcomp index + @./langcomp $@.l + +langcomp: langcomp.c + @$(MAKEBIN) $(CC) $(CFLAGS) langcomp.c -o $@ + + +language.h: index Makefile + @perl -e <index >$@ 'print STDERR "Generating language.h... "; $$i=0; while (<>) { chop; printf "#define %-32s %d\n", $$_, $$i++; } print "\n#define NUM_STRINGS $$i\n"; print STDERR "$$i strings\n";' + @cp language.h ../include + +index: en_us.l + @grep '^[A-Z]' en_us.l >index diff --git a/lang/Makefile.win32 b/lang/Makefile.win32 new file mode 100644 index 000000000..4791287e0 --- /dev/null +++ b/lang/Makefile.win32 @@ -0,0 +1,75 @@ +# Makefile for language module + +include ../Makefile.inc.win32 + + +LANGOBJS = cat de en_us es fr hun gr nl pl pt tr it ru +LANGSRCS = cat de en_us.l es fr.l hun.l gr.l nl.l pl.l pt.l tr.l it.l ru.l + +LANGCOMP = ./langcomp +#LANGCOMP = ./langcomp -w + + +all: $(LANGOBJS) + + +install: all + -copy cat ..\$(DATDEST)\languages + -copy en_us ..\$(DATDEST)\languages + -copy de ..\$(DATDEST)\languages + -copy es ..\$(DATDEST)\languages + -copy fr ..\$(DATDEST)\languages + -copy hun ..\$(DATDEST)\languages + -copy gr ..\$(DATDEST)\languages + -copy nl ..\$(DATDEST)\languages + -copy pl ..\$(DATDEST)\languages + -copy pt ..\$(DATDEST)\languages + -copy tr ..\$(DATDEST)\languages + -copy it ..\$(DATDEST)\languages + -copy ru ..\$(DATDEST)\languages + +clean: + -@erase $(LANGOBJS) langcomp.exe langtool.exe *.obj index + +spotless: clean + -@erase language.h + + +cat: cat.l langtool.exe langcomp.exe index + langcomp $@.l +de: de.l langtool.exe langcomp.exe index + langcomp $@.l +en_us: en_us.l langtool.exe langcomp.exe index + langcomp $@.l +es: es.l langtool.exe langcomp.exe index + langcomp $@.l +fr: fr.l langtool.exe langcomp.exe index + langcomp $@.l +hun: hun.l langtool.exe langcomp.exe index + langcomp $@.l +gr: gr.l langtool.exe langcomp.exe index + langcomp $@.l +nl: nl.l langtool.exe langcomp.exe index + langcomp $@.l +pl: pl.l langtool.exe langcomp.exe index + langcomp $@.l +pt: pt.l langtool.exe langcomp.exe index + langcomp $@.l +tr: tr.l langtool.exe langcomp.exe index + langcomp $@.l +it: it.l langtool.exe langcomp.exe index + langcomp $@.l +ru: ru.l langtool.exe langcomp.exe index + langcomp $@.l + +langtool.exe: langtool.c + $(CC) $(CFLAGS) langtool.c -o $@ /link $(LFLAGS) + +langcomp.exe: langcomp.c + $(CC) $(CFLAGS) langcomp.c -o $@ /link $(LFLAGS) + +language.h: langtool.exe index + langtool language.h + +index: langtool.exe en_us.l + langtool index |
